lsm: add a LSM_STARTED_ALL notification event

Add a new LSM notifier event, LSM_STARTED_ALL, which is fired once at
boot when all of the LSMs have been started.

Reviewed-by: Kees Cook <kees@kernel.org>
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>
This commit is contained in:
Paul Moore 2025-02-21 11:53:29 -05:00
parent 4ab5efcc28
commit dfa024bc3f
2 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,7 @@ struct timezone;
enum lsm_event { enum lsm_event {
LSM_POLICY_CHANGE, LSM_POLICY_CHANGE,
LSM_STARTED_ALL,
}; };
struct dm_verity_digest { struct dm_verity_digest {

View File

@ -556,6 +556,7 @@ static int __init security_initcall_late(void)
rc = lsm_initcall(late); rc = lsm_initcall(late);
lsm_pr_dbg("all enabled LSMs fully activated\n"); lsm_pr_dbg("all enabled LSMs fully activated\n");
call_blocking_lsm_notifier(LSM_STARTED_ALL, NULL);
return rc; return rc;
} }