Skip to content

Commit dfa024b

Browse files
committed
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>
1 parent 4ab5efc commit dfa024b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

include/linux/security.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ struct timezone;
8585

8686
enum lsm_event {
8787
LSM_POLICY_CHANGE,
88+
LSM_STARTED_ALL,
8889
};
8990

9091
struct dm_verity_digest {

security/lsm_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ static int __init security_initcall_late(void)
556556

557557
rc = lsm_initcall(late);
558558
lsm_pr_dbg("all enabled LSMs fully activated\n");
559+
call_blocking_lsm_notifier(LSM_STARTED_ALL, NULL);
559560

560561
return rc;
561562
}

0 commit comments

Comments
 (0)