summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@huawei.com>2024-02-15 11:31:10 +0100
committerPaul Moore <paul@paul-moore.com>2024-02-15 23:43:47 -0500
commit9238311176115aac1b1a86e8e968c04ebec747a1 (patch)
tree8f7a1898b2c23077045bce158dfc98c0cadb8236 /virt
parent84594c9ecdca7ca595bc50e315093cb76921fd8e (diff)
downloadlinux-stable-9238311176115aac1b1a86e8e968c04ebec747a1.tar.gz
linux-stable-9238311176115aac1b1a86e8e968c04ebec747a1.tar.bz2
linux-stable-9238311176115aac1b1a86e8e968c04ebec747a1.zip
evm: Move to LSM infrastructure
As for IMA, move hardcoded EVM function calls from various places in the kernel to the LSM infrastructure, by introducing a new LSM named 'evm' (last and always enabled like 'ima'). The order in the Makefile ensures that 'evm' hooks are executed after 'ima' ones. Make EVM functions as static (except for evm_inode_init_security(), which is exported), and register them as hook implementations in init_evm_lsm(). Also move the inline functions evm_inode_remove_acl(), evm_inode_post_remove_acl(), and evm_inode_post_set_acl() from the public evm.h header to evm_main.c. Unlike before (see commit to move IMA to the LSM infrastructure), evm_inode_post_setattr(), evm_inode_post_set_acl(), evm_inode_post_remove_acl(), and evm_inode_post_removexattr() are not executed for private inodes. Finally, add the LSM_ID_EVM case in lsm_list_modules_test.c Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Acked-by: Christian Brauner <brauner@kernel.org> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Acked-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions