]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipe: introduce 'boot_verified' as a trust provider
authorFan Wu <wufan@linux.microsoft.com>
Sat, 3 Aug 2024 06:08:20 +0000 (23:08 -0700)
committerPaul Moore <paul@paul-moore.com>
Tue, 20 Aug 2024 18:01:52 +0000 (14:01 -0400)
commita8a74df150835f5ceff89d40fadda1cf3961fdae
tree84d6dd11e8afd5ff4fc46706374ab239888966b1
parent2fea0c26b82f304f43b3905e56d954cf98a6d0e9
ipe: introduce 'boot_verified' as a trust provider

IPE is designed to provide system level trust guarantees, this usually
implies that trust starts from bootup with a hardware root of trust,
which validates the bootloader. After this, the bootloader verifies
the kernel and the initramfs.

As there's no currently supported integrity method for initramfs, and
it's typically already verified by the bootloader. This patch introduces
a new IPE property `boot_verified` which allows author of IPE policy to
indicate trust for files from initramfs.

The implementation of this feature utilizes the newly added
`initramfs_populated` hook. This hook marks the superblock of the rootfs
after the initramfs has been unpacked into it.

Before mounting the real rootfs on top of the initramfs, initramfs
script will recursively remove all files and directories on the
initramfs. This is typically implemented by using switch_root(8)
(https://man7.org/linux/man-pages/man8/switch_root.8.html).
Therefore the initramfs will be empty and not accessible after the real
rootfs takes over. It is advised to switch to a different policy
that doesn't rely on the `boot_verified` property after this point.
This ensures that the trust policies remain relevant and effective
throughout the system's operation.

Signed-off-by: Deven Bowers <deven.desai@linux.microsoft.com>
Signed-off-by: Fan Wu <wufan@linux.microsoft.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/ipe/eval.c
security/ipe/eval.h
security/ipe/hooks.c
security/ipe/hooks.h
security/ipe/ipe.c
security/ipe/ipe.h
security/ipe/policy.h
security/ipe/policy_parser.c