]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ipe: move initcalls to the LSM framework
authorPaul Moore <paul@paul-moore.com>
Tue, 18 Feb 2025 22:13:08 +0000 (17:13 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 22 Oct 2025 23:24:25 +0000 (19:24 -0400)
Reviewed-by: Kees Cook <kees@kernel.org>
Tested-by: Fan Wu <wufan@kernel.org>
Acked-by: Fan Wu <wufan@kernel.org>
Reviewed-by: John Johansen <john.johhansen@canonical.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/ipe/fs.c
security/ipe/ipe.c
security/ipe/ipe.h

index 0bb9468b8026336bc6111fadeffeed3b7b6da6ee..076c111c85c869dc5f2576065d0667eecb66d86e 100644 (file)
@@ -193,7 +193,7 @@ static const struct file_operations enforce_fops = {
  * Return: %0 on success. If an error occurs, the function will return
  * the -errno.
  */
-static int __init ipe_init_securityfs(void)
+int __init ipe_init_securityfs(void)
 {
        int rc = 0;
        struct ipe_policy *ap;
@@ -244,5 +244,3 @@ err:
        securityfs_remove(root);
        return rc;
 }
-
-fs_initcall(ipe_init_securityfs);
index 2426441181dc988ad3af5ab00008103627843646..71644748ed56c923b80e4b5207e0bf87423bc13a 100644 (file)
@@ -95,4 +95,5 @@ DEFINE_LSM(ipe) = {
        .id = &ipe_lsmid,
        .init = ipe_init,
        .blobs = &ipe_blobs,
+       .initcall_fs = ipe_init_securityfs,
 };
index fb37513812ddc17ef15e42f7ec6aaa887e2daf21..25cfdb8f0c20a15231dbe97376bca91d7358d4e9 100644 (file)
@@ -23,4 +23,6 @@ struct ipe_bdev *ipe_bdev(struct block_device *b);
 struct ipe_inode *ipe_inode(const struct inode *inode);
 #endif /* CONFIG_IPE_PROP_FS_VERITY_BUILTIN_SIG */
 
+int ipe_init_securityfs(void);
+
 #endif /* _IPE_H */