summaryrefslogtreecommitdiff
path: root/security/ipe/eval.h
diff options
context:
space:
mode:
authorFan Wu <wufan@linux.microsoft.com>2024-08-03 09:08:20 +0300
committerPaul Moore <paul@paul-moore.com>2024-08-20 21:01:52 +0300
commita8a74df150835f5ceff89d40fadda1cf3961fdae (patch)
tree84d6dd11e8afd5ff4fc46706374ab239888966b1 /security/ipe/eval.h
parent2fea0c26b82f304f43b3905e56d954cf98a6d0e9 (diff)
downloadlinux-a8a74df150835f5ceff89d40fadda1cf3961fdae.tar.xz
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>
Diffstat (limited to 'security/ipe/eval.h')
-rw-r--r--security/ipe/eval.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/ipe/eval.h b/security/ipe/eval.h
index 00ed8ceca10e..0fa6492354dd 100644
--- a/security/ipe/eval.h
+++ b/security/ipe/eval.h
@@ -15,10 +15,15 @@
extern struct ipe_policy __rcu *ipe_active_policy;
+struct ipe_superblock {
+ bool initramfs;
+};
+
struct ipe_eval_ctx {
enum ipe_op_type op;
const struct file *file;
+ bool initramfs;
};
void ipe_build_eval_ctx(struct ipe_eval_ctx *ctx,