From 4ab5efcc2829a38a3adcfdd9cd0c0e0eb6fb6939 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Tue, 18 Feb 2025 17:25:20 -0500 Subject: lsm: consolidate all of the LSM framework initcalls The LSM framework itself registers a small number of initcalls, this patch converts these initcalls into the new initcall mechanism. Reviewed-by: Casey Schaufler Reviewed-by: John Johansen Signed-off-by: Paul Moore --- security/min_addr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'security/min_addr.c') diff --git a/security/min_addr.c b/security/min_addr.c index c55bb84b8632..0fde5ec9abc8 100644 --- a/security/min_addr.c +++ b/security/min_addr.c @@ -5,6 +5,8 @@ #include #include +#include "lsm.h" + /* amount of vm to protect from userspace access by both DAC and the LSM*/ unsigned long mmap_min_addr; /* amount of vm to protect from userspace using CAP_SYS_RAWIO (DAC) */ @@ -52,11 +54,10 @@ static const struct ctl_table min_addr_sysctl_table[] = { }, }; -static int __init init_mmap_min_addr(void) +int __init min_addr_init(void) { register_sysctl_init("vm", min_addr_sysctl_table); update_mmap_min_addr(); return 0; } -pure_initcall(init_mmap_min_addr); -- cgit v1.2.3