aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorAlexandre Ghiti <alex@ghiti.fr>2019-09-23 18:38:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-24 18:54:11 -0400
commit67f3977f805b34cf0e41090679800d2091d41d49 (patch)
tree890420983b1d78727127650080058e6fea253d01 /kernel/sysctl.c
parente8d54b62c55ab6201de6d195fc2c276294c1f6ae (diff)
arm64, mm: move generic mmap layout functions to mm
arm64 handles top-down mmap layout in a way that can be easily reused by other architectures, so make it available in mm. It then introduces a new config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT that can be set by other architectures to benefit from those functions. Note that this new config depends on MMU being enabled, if selected without MMU support, a warning will be thrown. Link: http://lkml.kernel.org/r/20190730055113.23635-5-alex@ghiti.fr Signed-off-by: Alexandre Ghiti <alex@ghiti.fr> Suggested-by: Christoph Hellwig <hch@infradead.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Kees Cook <keescook@chromium.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: James Hogan <jhogan@kernel.org> Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Russell King <linux@armlinux.org.uk> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 078950d9605b..00fcea236eba 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -264,7 +264,8 @@ extern struct ctl_table epoll_table[];
264extern struct ctl_table firmware_config_table[]; 264extern struct ctl_table firmware_config_table[];
265#endif 265#endif
266 266
267#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT 267#if defined(HAVE_ARCH_PICK_MMAP_LAYOUT) || \
268 defined(CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT)
268int sysctl_legacy_va_layout; 269int sysctl_legacy_va_layout;
269#endif 270#endif
270 271
@@ -1573,7 +1574,8 @@ static struct ctl_table vm_table[] = {
1573 .proc_handler = proc_dointvec, 1574 .proc_handler = proc_dointvec,
1574 .extra1 = SYSCTL_ZERO, 1575 .extra1 = SYSCTL_ZERO,
1575 }, 1576 },
1576#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT 1577#if defined(HAVE_ARCH_PICK_MMAP_LAYOUT) || \
1578 defined(CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT)
1577 { 1579 {
1578 .procname = "legacy_va_layout", 1580 .procname = "legacy_va_layout",
1579 .data = &sysctl_legacy_va_layout, 1581 .data = &sysctl_legacy_va_layout,