diff options
| author | Paul Moore <paul@paul-moore.com> | 2025-02-18 17:11:32 -0500 |
|---|---|---|
| committer | Paul Moore <paul@paul-moore.com> | 2025-10-22 19:24:25 -0400 |
| commit | b0374e79a83c89f2a85f39364e215ac749ea2f31 (patch) | |
| tree | 20ff73ffe4d1315db9339a7dc5f22d5c02b7ba6d | |
| parent | cdc028812f727907d1575cf454a5f01ddffa7750 (diff) | |
loadpin: move initcalls to the LSM framework
Acked-by: Kees Cook <kees@kernel.org>
Reviewed-by: John Johansen <john.johhansen@canonical.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
| -rw-r--r-- | security/loadpin/loadpin.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/security/loadpin/loadpin.c b/security/loadpin/loadpin.c index b9ddf05c5c16..273ffbd6defe 100644 --- a/security/loadpin/loadpin.c +++ b/security/loadpin/loadpin.c @@ -270,11 +270,6 @@ static int __init loadpin_init(void) return 0; } -DEFINE_LSM(loadpin) = { - .id = &loadpin_lsmid, - .init = loadpin_init, -}; - #ifdef CONFIG_SECURITY_LOADPIN_VERITY enum loadpin_securityfs_interface_index { @@ -434,9 +429,15 @@ static int __init init_loadpin_securityfs(void) return 0; } -fs_initcall(init_loadpin_securityfs); +#endif /* CONFIG_SECURITY_LOADPIN_VERITY */ +DEFINE_LSM(loadpin) = { + .id = &loadpin_lsmid, + .init = loadpin_init, +#ifdef CONFIG_SECURITY_LOADPIN_VERITY + .initcall_fs = init_loadpin_securityfs, #endif /* CONFIG_SECURITY_LOADPIN_VERITY */ +}; /* Should not be mutable after boot, so not listed in sysfs (perm == 0). */ module_param(enforce, int, 0); |
