[PATCH v18 06/11] powerpc: Move ima buffer fields to struct kimage

Thiago Jung Bauermann bauerman at linux.ibm.com
Tue Feb 16 08:58:37 AEDT 2021


Lakshmi Ramasubramanian <nramas at linux.microsoft.com> writes:

> The fields ima_buffer_addr and ima_buffer_size in "struct kimage_arch"
> for powerpc are used to carry forward the IMA measurement list across
> kexec system call.  These fields are not architecture specific, but are
> currently limited to powerpc.
>
> arch_ima_add_kexec_buffer() defined in "arch/powerpc/kexec/ima.c"
> sets ima_buffer_addr and ima_buffer_size for the kexec system call.
> This function does not have architecture specific code, but is
> currently limited to powerpc.
>
> Move ima_buffer_addr and ima_buffer_size to "struct kimage".
> Set ima_buffer_addr and ima_buffer_size in ima_add_kexec_buffer()
> in security/integrity/ima/ima_kexec.c.
>
> Co-developed-by: Prakhar Srivastava <prsriva at linux.microsoft.com>
> Signed-off-by: Prakhar Srivastava <prsriva at linux.microsoft.com>
> Signed-off-by: Lakshmi Ramasubramanian <nramas at linux.microsoft.com>
> Suggested-by: Will Deacon <will at kernel.org>
> ---
>  arch/powerpc/include/asm/ima.h     |  3 ---
>  arch/powerpc/include/asm/kexec.h   |  5 -----
>  arch/powerpc/kexec/ima.c           | 29 ++++++-----------------------
>  include/linux/kexec.h              |  3 +++
>  security/integrity/ima/ima_kexec.c |  8 ++------
>  5 files changed, 11 insertions(+), 37 deletions(-)

Reviewed-by: Thiago Jung Bauermann <bauerman at linux.ibm.com>

-- 
Thiago Jung Bauermann
IBM Linux Technology Center


More information about the Linuxppc-dev mailing list