]> www.infradead.org Git - users/jedix/linux-maple.git/commit
initramfs,lsm: add a security hook to do_populate_rootfs()
authorFan Wu <wufan@linux.microsoft.com>
Sat, 3 Aug 2024 06:08:19 +0000 (23:08 -0700)
committerPaul Moore <paul@paul-moore.com>
Tue, 20 Aug 2024 18:01:41 +0000 (14:01 -0400)
commit2fea0c26b82f304f43b3905e56d954cf98a6d0e9
tree75d2e25539d522736a0fa0d878ee67cae2f7cb8e
parent52443cb60c356707df494910fa134bbb0a8b1a66
initramfs,lsm: add a security hook to do_populate_rootfs()

This patch introduces a new hook to notify security system that the
content of initramfs has been unpacked into the rootfs.

Upon receiving this notification, the security system can activate
a policy to allow only files that originated from the initramfs to
execute or load into kernel during the early stages of booting.

This approach is crucial for minimizing the attack surface by
ensuring that only trusted files from the initramfs are operational
in the critical boot phase.

Signed-off-by: Fan Wu <wufan@linux.microsoft.com>
[PM: subject line tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/linux/lsm_hook_defs.h
include/linux/security.h
init/initramfs.c
security/security.c