summaryrefslogtreecommitdiff
path: root/security/lsm.h
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2025-02-18 17:25:20 -0500
committerPaul Moore <paul@paul-moore.com>2025-10-22 19:24:28 -0400
commit4ab5efcc2829a38a3adcfdd9cd0c0e0eb6fb6939 (patch)
tree8486b521b41da8b609927db04e311ef6e6dec3c1 /security/lsm.h
parent3156bc814f21a976b25c1b4981dcb0f558302b27 (diff)
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 <casey@schaufler-ca.com> Reviewed-by: John Johansen <john.johhansen@canonical.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/lsm.h')
-rw-r--r--security/lsm.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/security/lsm.h b/security/lsm.h
index 8dc267977ae0..81aadbc61685 100644
--- a/security/lsm.h
+++ b/security/lsm.h
@@ -35,4 +35,24 @@ extern struct kmem_cache *lsm_inode_cache;
int lsm_cred_alloc(struct cred *cred, gfp_t gfp);
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
+static inline int securityfs_init(void)
+{
+ return 0;
+}
+#endif /* CONFIG_SECURITYFS */
+
#endif /* _LSM_H_ */