aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/uapi/asm/bootparam.h
diff options
context:
space:
mode:
authorJonathan McDowell <noodles@fb.com>2022-06-30 08:36:12 +0000
committerBorislav Petkov <bp@suse.de>2022-07-01 15:22:16 +0200
commitb69a2afd5afce9bf6d56e349d6ab592c916e20f2 (patch)
tree3406ca4a696ef1e6e3eab66a446ae5dfb56f1c73 /arch/x86/include/uapi/asm/bootparam.h
parentLinux 5.19-rc4 (diff)
downloadlinux-dev-b69a2afd5afce9bf6d56e349d6ab592c916e20f2.tar.xz
linux-dev-b69a2afd5afce9bf6d56e349d6ab592c916e20f2.zip
x86/kexec: Carry forward IMA measurement log on kexec
On kexec file load, the Integrity Measurement Architecture (IMA) subsystem may verify the IMA signature of the kernel and initramfs, and measure it. The command line parameters passed to the kernel in the kexec call may also be measured by IMA. A remote attestation service can verify a TPM quote based on the TPM event log, the IMA measurement list and the TPM PCR data. This can be achieved only if the IMA measurement log is carried over from the current kernel to the next kernel across the kexec call. PowerPC and ARM64 both achieve this using device tree with a "linux,ima-kexec-buffer" node. x86 platforms generally don't make use of device tree, so use the setup_data mechanism to pass the IMA buffer to the new kernel. Signed-off-by: Jonathan McDowell <noodles@fb.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> # IMA function definitions Link: https://lore.kernel.org/r/YmKyvlF3my1yWTvK@noodles-fedora-PC23Y6EG
Diffstat (limited to 'arch/x86/include/uapi/asm/bootparam.h')
-rw-r--r--arch/x86/include/uapi/asm/bootparam.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
index bea5cdcdf532..ca0796ac4403 100644
--- a/arch/x86/include/uapi/asm/bootparam.h
+++ b/arch/x86/include/uapi/asm/bootparam.h
@@ -11,6 +11,7 @@
#define SETUP_APPLE_PROPERTIES 5
#define SETUP_JAILHOUSE 6
#define SETUP_CC_BLOB 7
+#define SETUP_IMA 8
#define SETUP_INDIRECT (1<<31)
@@ -172,6 +173,14 @@ struct jailhouse_setup_data {
} __attribute__((packed)) v2;
} __attribute__((packed));
+/*
+ * IMA buffer setup data information from the previous kernel during kexec
+ */
+struct ima_setup_data {
+ __u64 addr;
+ __u64 size;
+} __attribute__((packed));
+
/* The so-called "zeropage" */
struct boot_params {
struct screen_info screen_info; /* 0x000 */