]> Gentwo Git Trees - linux/.git/commit
lsm: introduce an initcall mechanism into the LSM framework
authorPaul Moore <paul@paul-moore.com>
Tue, 11 Feb 2025 17:18:35 +0000 (12:18 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 22 Oct 2025 23:24:24 +0000 (19:24 -0400)
commitcdc028812f727907d1575cf454a5f01ddffa7750
treee7f1fbfa4d1916f6ac899123c1d25046cb59d7a3
parent3423c6397ce21356c3c2fac0b2727d428d96cfa4
lsm: introduce an initcall mechanism into the LSM framework

Currently the individual LSMs register their own initcalls, and while
this should be harmless, it can be wasteful in the case where a LSM
is disabled at boot as the initcall will still be executed.  This
patch introduces support for managing the initcalls in the LSM
framework, and future patches will convert the existing LSMs over to
this new mechanism.

Only initcall types which are used by the current in-tree LSMs are
supported, additional initcall types can easily be added in the future
if needed.

Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johhansen@canonical.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/linux/lsm_hooks.h
security/lsm_init.c