Re: [PATCH v15 10/10] arm64: Add IMA log information in kimage used for kexec
From: Will Deacon <will@kernel.org>
Date: 2021-01-27 16:57:43
Also in:
linux-devicetree, linux-integrity, linuxppc-dev, lkml
On Fri, Jan 15, 2021 at 09:30:17AM -0800, Lakshmi Ramasubramanian wrote:
quoted hunk ↗ jump to hunk
Address and size of the buffer containing the IMA measurement log need to be passed from the current kernel to the next kernel on kexec. Add address and size fields to "struct kimage_arch" for ARM64 platform to hold the address and size of the IMA measurement log buffer. Update CONFIG_KEXEC_FILE to select CONFIG_HAVE_IMA_KEXEC, if CONFIG_IMA is enabled, to indicate that the IMA measurement log information is present in the device tree for ARM64. Co-developed-by: Prakhar Srivastava <redacted> Signed-off-by: Prakhar Srivastava <redacted> Signed-off-by: Lakshmi Ramasubramanian <redacted> Reviewed-by: Thiago Jung Bauermann <redacted> --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/kexec.h | 5 +++++ 2 files changed, 6 insertions(+)diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 1d466addb078..ea7f7fe3dccd 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig@@ -1094,6 +1094,7 @@ config KEXEC config KEXEC_FILE bool "kexec file based system call" select KEXEC_CORE + select HAVE_IMA_KEXEC if IMA help This is new version of kexec system call. This system call is file based and takes file descriptors as system call argumentdiff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h index d24b527e8c00..2bd19ccb6c43 100644 --- a/arch/arm64/include/asm/kexec.h +++ b/arch/arm64/include/asm/kexec.h@@ -100,6 +100,11 @@ struct kimage_arch { void *elf_headers; unsigned long elf_headers_mem; unsigned long elf_headers_sz; + +#ifdef CONFIG_IMA_KEXEC + phys_addr_t ima_buffer_addr; + size_t ima_buffer_size; +#endif
Why do these need to be in the arch structure instead of 'struct kimage'? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel