]> Gentwo Git Trees - linux/.git/commit
ima,evm: move initcalls to the LSM framework
authorRoberto Sassu <roberto.sassu@huawei.com>
Tue, 2 Sep 2025 12:54:57 +0000 (14:54 +0200)
committerPaul Moore <paul@paul-moore.com>
Wed, 22 Oct 2025 23:24:27 +0000 (19:24 -0400)
commit82fe7932e84f618c6ec217203606f0c27ebef94b
treef65a120ddd0dc45b3e546f448a1f71fd90c54a2b
parent77ebff0607c558e543f806f63be08e109b20e3eb
ima,evm: move initcalls to the LSM framework

This patch converts IMA and EVM to use the LSM frameworks's initcall
mechanism. It moved the integrity_fs_init() call to ima_fs_init() and
evm_init_secfs(), to work around the fact that there is no "integrity" LSM,
and introduced integrity_fs_fini() to remove the integrity directory, if
empty. Both integrity_fs_init() and integrity_fs_fini() support the
scenario of being called by both the IMA and EVM LSMs.

This patch does not touch any of the platform certificate code that
lives under the security/integrity/platform_certs directory as the
IMA/EVM developers would prefer to address that in a future patchset.

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Acked-by: Mimi Zohar <zohar@linux.ibm.com>
[PM: adjust description as discussed over email]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/integrity/evm/evm_main.c
security/integrity/evm/evm_secfs.c
security/integrity/iint.c
security/integrity/ima/ima_fs.c
security/integrity/ima/ima_main.c
security/integrity/integrity.h