Re: [PATCH v8 2/4] powerpc: Refactor kexec functions to move arch independent code to ima
From: Mimi Zohar <zohar@linux.ibm.com>
Date: 2020-11-03 14:58:33
Also in:
linux-integrity, lkml
Hi Lakshmi, On Fri, 2020-10-30 at 10:44 -0700, Lakshmi Ramasubramanian wrote:
The functions ima_get_kexec_buffer() and ima_free_kexec_buffer(), that handle carrying forward the IMA measurement logs on kexec for powerpc do not have architecture specific code, but they are currently defined for powerpc only. Move ima_get_kexec_buffer() and ima_free_kexec_buffer() to IMA subsystem. A later patch in this series will use these functions for carrying forward the IMA measurement log for ARM64. With the above refactoring arch/powerpc/kexec/ima.c contains only functions used when CONFIG_IMA_KEXEC is enabled. Update Makefile in arch/powerpc/kexec to include arch/powerpc/kexec/ima.c only when CONFIG_IMA_KEXEC is enabled. Co-developed-by: Prakhar Srivastava <redacted> Signed-off-by: Prakhar Srivastava <redacted> Signed-off-by: Lakshmi Ramasubramanian <redacted>
Similar comments to 1/4. - Last line of first paragraph can be rephrased like " ... on kexec, do not contain architecture specific code, but are currently limited to powerpc." - This patch should be limited to moving existing functions. Truncate the Subject line to "Move arch independent IMA kexec functions to ima_kexec.c." - Don't refer to a later patch, but explain the purpose here. For example, "Move ... , making them accessible to other archs." - The definition of "FDT_PROP_IMA_KEXEC_BUFFER" should be made as a separate, prepartory patch, prior to the existing 1/4. The resulting code being moved in this patch (and similarly for 1/4) will be exactly the same as the code being deleted. thanks, Mimi