Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kexec: Move ELF fields to struct kimage

ELF related fields elf_headers, elf_headers_sz, and elf_load_addr are
defined in architecture specific 'struct kimage_arch' for x86, powerpc,
and arm64. The name of these fields are different in these
architectures that makes it hard to have a common code for setting up
the device tree for kexec system call.

Move the ELF fields to 'struct kimage' defined in include/linux/kexec.h
so common code can use it.

Suggested-by: Rob Herring <robh@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210221174930.27324-2-nramas@linux.microsoft.com

authored by

Lakshmi Ramasubramanian and committed by
Rob Herring
9336a5f6 a38fd874

+5
+5
include/linux/kexec.h
··· 305 305 /* Virtual address of IMA measurement buffer for kexec syscall */ 306 306 void *ima_buffer; 307 307 #endif 308 + 309 + /* Core ELF header buffer */ 310 + void *elf_headers; 311 + unsigned long elf_headers_sz; 312 + unsigned long elf_load_addr; 308 313 }; 309 314 310 315 /* kexec interface functions */