提交 cc878e26 编写于 作者: L Lakshmi Ramasubramanian 提交者: Zheng Zengkai

kexec: Move ELF fields to struct kimage

mainline inclusion
from linux-next
commit 9336a5f6
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: NRob Herring <robh@kernel.org>
Reported-by: Nkernel test robot <lkp@intel.com>
Signed-off-by: NLakshmi Ramasubramanian <nramas@linux.microsoft.com>
Reviewed-by: NThiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: NRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210221174930.27324-2-nramas@linux.microsoft.comSigned-off-by: NLi Huafei <lihuafei1@huawei.com>
Reviewed-by: NYang Jihong <yangjihong1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 f49ad87c
...@@ -305,6 +305,11 @@ struct kimage { ...@@ -305,6 +305,11 @@ struct kimage {
/* Virtual address of IMA measurement buffer for kexec syscall */ /* Virtual address of IMA measurement buffer for kexec syscall */
void *ima_buffer; void *ima_buffer;
#endif #endif
/* Core ELF header buffer */
void *elf_headers;
unsigned long elf_headers_sz;
unsigned long elf_load_addr;
}; };
/* kexec interface functions */ /* kexec interface functions */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册