diff options
| author | Kaixiong Yu <yukaixiong@huawei.com> | 2025-01-11 15:07:42 +0800 |
|---|---|---|
| committer | Joel Granados <joel.granados@kernel.org> | 2025-02-07 16:53:04 +0100 |
| commit | b121dd4d557212067275e988137f2e2c5b2c0077 (patch) | |
| tree | 6266d606accb25f2ea299baf6a4acac5e5a34005 /kernel/sysctl.c | |
| parent | mm: mmap: move sysctl to mm/mmap.c (diff) | |
| download | linux-b121dd4d557212067275e988137f2e2c5b2c0077.tar.gz linux-b121dd4d557212067275e988137f2e2c5b2c0077.zip | |
security: min_addr: move sysctl to security/min_addr.c
The dac_mmap_min_addr belongs to min_addr.c, move it to
min_addr.c from /kernel/sysctl.c. In the previous Linux kernel
boot process, sysctl_init_bases needs to be executed before
init_mmap_min_addr, So, register_sysctl_init should be executed
before update_mmap_min_addr in init_mmap_min_addr. And according
to the compilation condition in security/Makefile:
obj-$(CONFIG_MMU) += min_addr.o
if CONFIG_MMU is not defined, min_addr.c would not be included in the
compilation process. So, drop the CONFIG_MMU check.
Signed-off-by: Kaixiong Yu <yukaixiong@huawei.com>
Reviewed-by: Kees Cook <kees@kernel.org>
Acked-by: Paul Moore <paul@paul-moore.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 98a95396d20b..c9e91ea550d7 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2049,15 +2049,6 @@ static const struct ctl_table vm_table[] = { .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, }, -#ifdef CONFIG_MMU - { - .procname = "mmap_min_addr", - .data = &dac_mmap_min_addr, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = mmap_min_addr_handler, - }, -#endif #if (defined(CONFIG_X86_32) && !defined(CONFIG_UML))|| \ (defined(CONFIG_SUPERH) && defined(CONFIG_VSYSCALL)) { |
