[PATCH v18 02/11] arm64: Rename kexec elf_headers_mem to elf_load_addr

2021-02-13 Thread Lakshmi Ramasubramanian
. Rename elf_headers_mem to elf_load_addr to align with powerpc name so common code can use it. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Thiago Jung Bauermann --- arch/arm64/include/asm/kexec.h | 2 +- arch/arm64/kernel/machine_kexec_file.c | 6 +++--- 2 files changed, 4

[PATCH v18 01/11] powerpc: Rename kexec elfcorehdr_addr to elf_load_addr

2021-02-13 Thread Lakshmi Ramasubramanian
kexec system call. Rename elfcorehdr_addr to elf_load_addr to align with x86_64 name so common code can use it. Signed-off-by: Rob Herring Reviewed-by: Lakshmi Ramasubramanian --- arch/powerpc/include/asm/kexec.h | 2 +- arch/powerpc/kexec/file_load.c| 4 ++-- arch/powerpc/kexec

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

2021-02-13 Thread Lakshmi Ramasubramanian
r_size in ima_add_kexec_buffer() in security/integrity/ima/ima_kexec.c. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Will Deacon --- arch/powerpc/include/asm/ima.h | 3 --- arch/powerpc/include/asm/kexec.h

[PATCH v18 05/11] powerpc: Use common of_kexec_alloc_and_setup_fdt()

2021-02-13 Thread Lakshmi Ramasubramanian
e tree and update the memory reservation for kexec for powerpc. Signed-off-by: Rob Herring Signed-off-by: Lakshmi Ramasubramanian --- arch/powerpc/include/asm/kexec.h | 1 + arch/powerpc/kexec/elf_64.c | 30 --- arch/powerpc/kexec/file_load.c| 132 +- ar

[PATCH v18 07/11] powerpc: Enable passing IMA log to next kernel on kexec

2021-02-13 Thread Lakshmi Ramasubramanian
information is present in the device tree for powerpc. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Thiago Jung Bauermann Reviewed-by: Thiago Jung Bauermann --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc

[PATCH v18 08/11] powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c

2021-02-13 Thread Lakshmi Ramasubramanian
t;arch/powerpc/kexec/ima.c" and "arch/powerpc/include/asm/ima.h". Remove references to the deleted files and functions in powerpc and in ima. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Ba

[PATCH v18 09/11] kexec: Use fdt_appendprop_addrrange() to add ima buffer to FDT

2021-02-13 Thread Lakshmi Ramasubramanian
e next kernel across kexec system call. Remove custom code that is used in setup_ima_buffer() to add "linux,ima-kexec-buffer" property to the device tree. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago J

[PATCH v18 10/11] powerpc: Delete unused function delete_fdt_mem_rsv()

2021-02-13 Thread Lakshmi Ramasubramanian
Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann --- arch/powerpc/include/asm/kexec.h | 1 - arch/powerpc/kexec/file_load.c | 32 2 files changed, 33 deletions(-) diff --git a/arch/powerpc/include/asm/kexec.h b/ar

[PATCH v18 11/11] arm64: Enable passing IMA log to next kernel on kexec

2021-02-13 Thread Lakshmi Ramasubramanian
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 Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian

[PATCH] of: error: 'const struct kimage' has no member named 'arch'

2021-02-18 Thread Lakshmi Ramasubramanian
ew boolean config OF_KEXEC that is enabled if CONFIG_KEXEC_FILE and CONFIG_OF_FLATTREE are enabled, and the architecture is arm64 or powerpc64. Build drivers/of/kexec.c if CONFIG_OF_KEXEC is enabled. Signed-off-by: Lakshmi Ramasubramanian Fixes: 33488dc4d61f ("of: Add a common kexec FDT

Re: [PATCH] of: error: 'const struct kimage' has no member named 'arch'

2021-02-18 Thread Lakshmi Ramasubramanian
On 2/18/21 4:07 PM, Mimi Zohar wrote: Hi Mimi, On Thu, 2021-02-18 at 14:33 -0800, Lakshmi Ramasubramanian wrote: of_kexec_alloc_and_setup_fdt() defined in drivers/of/kexec.c builds a new device tree object that includes architecture specific data for kexec system call. This should be defined

Re: [PATCH] of: error: 'const struct kimage' has no member named 'arch'

2021-02-18 Thread Lakshmi Ramasubramanian
On 2/18/21 5:13 PM, Thiago Jung Bauermann wrote: Lakshmi Ramasubramanian writes: On 2/18/21 4:07 PM, Mimi Zohar wrote: Hi Mimi, On Thu, 2021-02-18 at 14:33 -0800, Lakshmi Ramasubramanian wrote: of_kexec_alloc_and_setup_fdt() defined in drivers/of/kexec.c builds a new device tree object

Re: [PATCH] powerpc/kexec_file: Restore FDT size estimation for kdump kernel

2021-02-19 Thread Lakshmi Ramasubramanian
On 2/19/21 6:25 AM, Thiago Jung Bauermann wrote: One small nit in the function header (please see below), but otherwise the change looks good. Reviewed-by: Lakshmi Ramasubramanian Commit 2377c92e37fe ("powerpc/kexec_file: fix FDT size estimation for kdump kernel") fixed how

Re: [PATCH] of: error: 'const struct kimage' has no member named 'arch'

2021-02-19 Thread Lakshmi Ramasubramanian
On 2/19/21 6:16 AM, Rob Herring wrote: On Thu, Feb 18, 2021 at 8:53 PM Lakshmi Ramasubramanian wrote: On 2/18/21 5:13 PM, Thiago Jung Bauermann wrote: Lakshmi Ramasubramanian writes: On 2/18/21 4:07 PM, Mimi Zohar wrote: Hi Mimi, On Thu, 2021-02-18 at 14:33 -0800, Lakshmi

Re: [PATCH] of: error: 'const struct kimage' has no member named 'arch'

2021-02-19 Thread Lakshmi Ramasubramanian
On 2/19/21 10:09 AM, Thiago Jung Bauermann wrote: Mimi Zohar writes: On Fri, 2021-02-19 at 11:43 -0600, Rob Herring wrote: On Fri, Feb 19, 2021 at 10:57 AM Lakshmi Ramasubramanian wrote: On 2/19/21 6:16 AM, Rob Herring wrote: On Thu, Feb 18, 2021 at 8:53 PM Lakshmi Ramasubramanian

[PATCH v19 04/13] x86: Use ELF fields defined in 'struct kimage'

2021-02-21 Thread Lakshmi Ramasubramanian
ELF related fields elf_headers, elf_headers_sz, and elf_load_addr have been moved from 'struct kimage_arch' to 'struct kimage'. Use the ELF fields defined in 'struct kimage'. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Rob Herring Fixes: 33488dc4d61f (&qu

[PATCH v19 01/13] kexec: Move ELF fields to struct kimage

2021-02-21 Thread Lakshmi Ramasubramanian
for kexec system call. Move the ELF fields to 'struct kimage' defined in include/linux/kexec.h so common code can use it. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Rob Herring Fixes: 33488dc4d61f ("of: Add a common kexec FDT setup function") Reported-by: kernel

[PATCH v19 00/13] Carry forward IMA measurement log on kexec on ARM64

2021-02-21 Thread Lakshmi Ramasubramanian
e ima-kexec-buffer node in the chosen node documentation v0: Add a layer of abstraction to use the memory reserved by device tree for ima buffer pass. Add support for ima buffer pass using reserved memory for arm64 kexec. Update the arch sepcific code path in kexec file load to store th

[PATCH v19 03/13] powerpc: Use ELF fields defined in 'struct kimage'

2021-02-21 Thread Lakshmi Ramasubramanian
ELF related fields elf_headers, elf_headers_sz, and elfcorehdr_addr have been moved from 'struct kimage_arch' to 'struct kimage' as elf_headers, elf_headers_sz, and elf_load_addr respectively. Use the ELF fields defined in 'struct kimage'. Signed-off-by: Lakshmi

[PATCH v19 02/13] arm64: Use ELF fields defined in 'struct kimage'

2021-02-21 Thread Lakshmi Ramasubramanian
ELF related fields elf_headers, elf_headers_sz, and elf_headers_mem have been moved from 'struct kimage_arch' to 'struct kimage' as elf_headers, elf_headers_sz, and elf_load_addr respectively. Use the ELF fields defined in 'struct kimage'. Signed-off-by: Lakshmi

[PATCH v19 05/13] of: Add a common kexec FDT setup function

2021-02-21 Thread Lakshmi Ramasubramanian
c and arm64, in of_kexec_alloc_and_setup_fdt() and move it to "drivers/of/kexec.c". Signed-off-by: Rob Herring Signed-off-by: Lakshmi Ramasubramanian Fixes: 33488dc4d61f ("of: Add a common kexec FDT setup function") Reported-by: ker

[PATCH v19 07/13] powerpc: Use common of_kexec_alloc_and_setup_fdt()

2021-02-21 Thread Lakshmi Ramasubramanian
e tree and update the memory reservation for kexec for powerpc. Signed-off-by: Rob Herring Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann --- arch/powerpc/include/asm/kexec.h | 1 + arch/powerpc/kexec/elf_64.c | 30 --- arch/powerpc/kexec/file_load.

[PATCH v19 06/13] arm64: Use common of_kexec_alloc_and_setup_fdt()

2021-02-21 Thread Lakshmi Ramasubramanian
e tree and update the memory reservation for kexec for arm64. Signed-off-by: Rob Herring Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann --- arch/arm64/kernel/machine_kexec_file.c | 180 ++--- 1 file changed, 8 insertions(+), 172 deletions(-) diff --

[PATCH v19 08/13] powerpc: Move ima buffer fields to struct kimage

2021-02-21 Thread Lakshmi Ramasubramanian
r_size in ima_add_kexec_buffer() in security/integrity/ima/ima_kexec.c. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Will Deacon Reviewed-by: Thiago Jung Bauermann --- arch/powerpc/include/asm/ima.h | 3 --- ar

[PATCH v19 09/13] powerpc: Enable passing IMA log to next kernel on kexec

2021-02-21 Thread Lakshmi Ramasubramanian
information is present in the device tree for powerpc. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Thiago Jung Bauermann Reviewed-by: Thiago Jung Bauermann --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc

[PATCH v19 10/13] powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c

2021-02-21 Thread Lakshmi Ramasubramanian
t;arch/powerpc/kexec/ima.c" and "arch/powerpc/include/asm/ima.h". Remove references to the deleted files and functions in powerpc and in ima. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Ba

[PATCH v19 11/13] kexec: Use fdt_appendprop_addrrange() to add ima buffer to FDT

2021-02-21 Thread Lakshmi Ramasubramanian
e next kernel across kexec system call. Remove custom code that is used in setup_ima_buffer() to add "linux,ima-kexec-buffer" property to the device tree. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago J

[PATCH v19 12/13] powerpc: Delete unused function delete_fdt_mem_rsv()

2021-02-21 Thread Lakshmi Ramasubramanian
Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann --- arch/powerpc/include/asm/kexec.h | 1 - arch/powerpc/kexec/file_load.c | 32 2 files changed, 33 deletions(-) diff --git a/arch/powerpc/include/asm/kexec.h b/ar

[PATCH v19 13/13] arm64: Enable passing IMA log to next kernel on kexec

2021-02-21 Thread Lakshmi Ramasubramanian
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 Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian

Re: [PATCH v18 03/11] of: Add a common kexec FDT setup function

2021-02-21 Thread Lakshmi Ramasubramanian
On 2/21/21 5:32 PM, Guenter Roeck wrote: Hi Guenter, On Sat, Feb 13, 2021 at 08:10:41AM -0800, Lakshmi Ramasubramanian wrote: From: Rob Herring Both arm64 and powerpc do essentially the same FDT /chosen setup for kexec. The differences are either omissions that arm64 should have or

Re: [PATCH v19 05/13] of: Add a common kexec FDT setup function

2021-02-23 Thread Lakshmi Ramasubramanian
On 2/23/21 5:20 PM, Thiago Jung Bauermann wrote: Lakshmi Ramasubramanian writes: From: Rob Herring Both arm64 and powerpc do essentially the same FDT /chosen setup for kexec. The differences are either omissions that arm64 should have or additional properties that will be ignored. The

Re: [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-18 Thread Lakshmi Ramasubramanian
t ima kexec functions to drivers/of/kexec.c") Cc: Frank Rowand Cc: Prakhar Srivastava Cc: Lakshmi Ramasubramanian Cc: Thiago Jung Bauermann Cc: Rob Herring Signed-off-by: Vaibhav Jain --- drivers/of/kexec.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/of/kexec.c

<    1   2