From cc878e263b20f8547c382cc2d4916c9f56f17214 Mon Sep 17 00:00:00 2001 From: Lakshmi Ramasubramanian Date: Thu, 18 Mar 2021 19:25:34 +0800 Subject: [PATCH] kexec: Move ELF fields to struct kimage mainline inclusion from linux-next commit 9336a5f64b54d2913fb5daa1ac0280ff36f1c5ed category: feature bugzilla: 46864 CVE: NA -------------------------------- 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 Reported-by: kernel test robot Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-2-nramas@linux.microsoft.com Signed-off-by: Li Huafei Reviewed-by: Yang Jihong Signed-off-by: Zheng Zengkai --- include/linux/kexec.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index fb327fe23415..02f8faa2c8d1 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -305,6 +305,11 @@ struct kimage { /* Virtual address of IMA measurement buffer for kexec syscall */ void *ima_buffer; #endif + + /* Core ELF header buffer */ + void *elf_headers; + unsigned long elf_headers_sz; + unsigned long elf_load_addr; }; /* kexec interface functions */ -- GitLab