Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+8 -7
+8 -7
security/loadpin/loadpin.c
··· 270 270 return 0; 271 271 } 272 272 273 - DEFINE_LSM(loadpin) = { 274 - .id = &loadpin_lsmid, 275 - .init = loadpin_init, 276 - }; 277 - 278 273 #ifdef CONFIG_SECURITY_LOADPIN_VERITY 279 274 280 275 enum loadpin_securityfs_interface_index { ··· 429 434 return 0; 430 435 } 431 436 432 - fs_initcall(init_loadpin_securityfs); 433 - 434 437 #endif /* CONFIG_SECURITY_LOADPIN_VERITY */ 438 + 439 + DEFINE_LSM(loadpin) = { 440 + .id = &loadpin_lsmid, 441 + .init = loadpin_init, 442 + #ifdef CONFIG_SECURITY_LOADPIN_VERITY 443 + .initcall_fs = init_loadpin_securityfs, 444 + #endif /* CONFIG_SECURITY_LOADPIN_VERITY */ 445 + }; 435 446 436 447 /* Should not be mutable after boot, so not listed in sysfs (perm == 0). */ 437 448 module_param(enforce, int, 0);