]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tomoyo: move initcalls to the LSM framework
authorPaul Moore <paul@paul-moore.com>
Tue, 18 Feb 2025 22:23:02 +0000 (17:23 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 22 Oct 2025 23:24:26 +0000 (19:24 -0400)
Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: John Johansen <john.johhansen@canonical.com>
Acked-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/tomoyo/common.h
security/tomoyo/securityfs_if.c
security/tomoyo/tomoyo.c

index 0e8e2e959aef4ec0a96c1bd98aa53c2a87da4e69..3b2a97d10a5d8c4f6a0f1ce1c1f314b7c1c7bfe9 100644 (file)
@@ -924,6 +924,8 @@ struct tomoyo_task {
 
 /********** Function prototypes. **********/
 
+int tomoyo_interface_init(void);
+
 bool tomoyo_address_matches_group(const bool is_ipv6, const __be32 *address,
                                  const struct tomoyo_group *group);
 bool tomoyo_compare_number_union(const unsigned long value,
index 7e69747b2f77142ff3455701838ba683fe523b73..33933645f5b9e164a206b4032ecc5764cbe95912 100644 (file)
@@ -233,7 +233,7 @@ static void __init tomoyo_create_entry(const char *name, const umode_t mode,
  *
  * Returns 0.
  */
-static int __init tomoyo_interface_init(void)
+int __init tomoyo_interface_init(void)
 {
        struct tomoyo_domain_info *domain;
        struct dentry *tomoyo_dir;
@@ -269,5 +269,3 @@ static int __init tomoyo_interface_init(void)
        tomoyo_load_builtin_policy();
        return 0;
 }
-
-fs_initcall(tomoyo_interface_init);
index cb003c460dc2133fc89e70841446f7a6a1d4e2a3..c66e02ed8ee3b9b39f8e3e78ef2c06fb73567269 100644 (file)
@@ -617,4 +617,5 @@ DEFINE_LSM(tomoyo) = {
        .flags = LSM_FLAG_LEGACY_MAJOR,
        .blobs = &tomoyo_blob_sizes,
        .init = tomoyo_init,
+       .initcall_fs = tomoyo_interface_init,
 };