Kexec-tools: Fix physcal address value in vmcore ELF segment header
Quoted 8 lines · Zou Nan hai
I used fixed 64M as physical offset in vmcore ELF segment header. This gives trouble to crash utility to analyze vmcore on platform that load kernel to a different address.
This patch will fix it.
Signed-off-by Zou Nan hai <[email protected]>
Thanks,
I have merged this into kexec-tools-testing
Signature · 3 lines
Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/
Quoted 13 lines · Zou Nan hai
I used fixed 64M as physical offset in vmcore ELF segment header. This gives trouble to crash utility to analyze vmcore on platform that load kernel to a different address.
This patch will fix it.
Signed-off-by Zou Nan hai <[email protected]>diff -Nraup
kexec-tools-1.101/kexec/arch/ia64/crashdump-ia64.ckexec-tools-1.101-fix/kexec/arch/ia64/crashdump-ia64.c
kexec/arch/ia64/crashdump-ia64.c line 31
Quoted 5 lines
kexec/arch/ia64/crashdump-ia64.c +1
-1@@ -28,7 +28,7 @@#include "crashdump-ia64.h" int memory_ranges =0 ; -#define LOAD_OFFSET (0xa000000000000000UL + 0x100000000UL - (1UL<<26)) +#define LOAD_OFFSET (0xa000000000000000UL + 0x100000000UL - kernel_code_start)
This will work as long as virtual address for which kernel is being compiled remains same. (I guess, 0xa000000000000000UL + 0x100000000UL). If you shift the kernel little bit in virtual address space, this assumption will be broken.
That's why I put a patch to read /proc/kcore and determine for which virtual address the kernel has been built and there is no hardcoding. (Thanks to Eric for the suggestion.)
-Vivek