summaryrefslogtreecommitdiff
path: root/security/lsm.h
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2026-01-29 13:31:56 -0500
committerPaul Moore <paul@paul-moore.com>2026-01-29 13:56:53 -0500
commitbdde21d3e77da55121885fd2ef42bc6a15ac2f0c (patch)
tree19d99919debfcbc83af63e4193b1abd8b6a91b94 /security/lsm.h
parent63804fed149a6750ffd28610c5c1c98cce6bd377 (diff)
lsm: preserve /proc/sys/vm/mmap_min_addr when !CONFIG_SECURITY
While reworking the LSM initialization code the /proc/sys/vm/mmap_min_addr handler was inadvertently caught up in the change and the procfs entry wasn't setup when CONFIG_SECURITY was not selected at kernel build time. This patch restores the previous behavior and ensures that the procfs entry is setup regardless of the CONFIG_SECURITY state. Future work will improve upon this, likely by moving the procfs handler into the mm subsystem, but this patch should resolve the immediate regression. Fixes: 4ab5efcc2829 ("lsm: consolidate all of the LSM framework initcalls") Reported-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Tested-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Kees Cook <kees@kernel.org> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/lsm.h')
-rw-r--r--security/lsm.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/security/lsm.h b/security/lsm.h
index 81aadbc61685..db77cc83e158 100644
--- a/security/lsm.h
+++ b/security/lsm.h
@@ -37,15 +37,6 @@ int lsm_task_alloc(struct task_struct *task);
/* LSM framework initializers */
-#ifdef CONFIG_MMU
-int min_addr_init(void);
-#else
-static inline int min_addr_init(void)
-{
- return 0;
-}
-#endif /* CONFIG_MMU */
-
#ifdef CONFIG_SECURITYFS
int securityfs_init(void);
#else