Add the symbol "phys_base" to vmcoreinfo
Subsystems (3)
PATCH 1/1 Add the symbol "phys_base" to vmcoreinfo
Hi Andrew,
This patch fixes the problem that makedumpfile sometimes fails on x86_64 machine. I hope that this patch will be merged to both linux-2.6.25 and linux-2.6.24.5.
This patch adds the symbol "phys_base" to a vmcoreinfo data. The vmcoreinfo data has the minimum debugging information only for dump filtering. makedumpfile (dump filtering command) gets it to distinguish unnecessary pages, and makedumpfile creates a small dumpfile.
On x86_64 kernel which compiled with CONFIG_PHYSICAL_START=0x0 and CONFIG_RELOCATABLE=y, makedumpfile fails like the following:
# makedumpfile -d31 /proc/vmcore dumpfile The kernel version is not supported. The created dumpfile may be incomplete. _exclude_free_page: Can't get next online node.
makedumpfile Failed.
#
The cause is the lack of the symbol "phys_base" in a vmcoreinfo data. If the symbol "phys_base" does not exist, makedumpfile considers an x86_64 kernel as non relocatable. As the result, makedumpfile misunderstands the physical address where the kernel is loaded, and it cannot translate a kernel virtual address to physical address correctly. To fix this proble, the attached patch which adds the symbol "phys_base" to a vmcoreinfo data.
Thanks
Ken'ichi Ohmichi
---
arch/x86/kernel/machine_kexec_64.c +1 -0
@@ -233,6 +233,7 @@ NORET_TYPE void machine_kexec(struct kimvoid arch_crash_save_vmcoreinfo (void ) { +VMCOREINFO_SYMBOL (phys_base);VMCOREINFO_SYMBOL (init_level4_pgt);#ifdef CONFIG_NUMA
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 43 lines · Ken'ichi Ohmichi
Hi Andrew,
This patch fixes the problem that makedumpfile sometimes fails on
x86_64machine. I hope that this patch will be merged to both linux-2.6.25 and linux-2.6.24.5.This patch adds the symbol "
phys_base" to a vmcoreinfo data. The vmcoreinfo data has the minimum debugging information only for dump filtering. makedumpfile (dump filtering command) gets it to distinguish unnecessary pages, and makedumpfile creates a small dumpfile.On
x86_64kernel which compiled withCONFIG_PHYSICAL_START=0x0andCONFIG_RELOCATABLE=y, makedumpfile fails like the following:# makedumpfile -d31 /proc/vmcore dumpfile The kernel version is not supported. The created dumpfile may be incomplete. _exclude_free_page: Can't get next online node.makedumpfile Failed.
#The cause is the lack of the symbol "
phys_base" in a vmcoreinfo data. If the symbol "phys_base" does not exist, makedumpfile considers anx86_64kernel as non relocatable. As the result, makedumpfile misunderstands the physical address where the kernel is loaded, and it cannot translate a kernel virtual address to physical address correctly. To fix this proble, the attached patch which adds the symbol "phys_base" to a vmcoreinfo data.Thanks
Ken'ichi OhmichiSigned-off-by Ken'ichi Ohmichi <[email protected]>---
diff -rpuNlinux-2.6.25-rc7.orig/arch/x86/kernel/machine_kexec_64.clinux-2.6.25-rc7/arch/x86/kernel/machine_kexec_64.c
arch/x86/kernel/machine_kexec_64.c NORET_TYPE void machine_kexec(struct kim · line 237
Quoted 5 lines
arch/x86/kernel/machine_kexec_64.c +1
-0@@ -233,6 +233,7 @@ NORET_TYPE void machine_kexec(struct kimvoid arch_crash_save_vmcoreinfo (void ) { +VMCOREINFO_SYMBOL (phys_base);VMCOREINFO_SYMBOL (init_level4_pgt);
CCing to LKML.
Looks good to me. Given a vmcore file, one needs to know about the shift between compile address and run time address of kernel to be able to do filtering. This shift (phys_base) will vary based on kernel config options and based on where boot loader has loaded a kernel.
Thanks
Vivek
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Vivek,
Quoted 51 lines · Vivek Goyal
Quoted 42 lines · Ken'ichi Ohmichi
Hi Andrew,
This patch fixes the problem that makedumpfile sometimes fails on
x86_64machine. I hope that this patch will be merged to both linux-2.6.25 and linux-2.6.24.5.This patch adds the symbol "
phys_base" to a vmcoreinfo data. The vmcoreinfo data has the minimum debugging information only for dump filtering. makedumpfile (dump filtering command) gets it to distinguish unnecessary pages, and makedumpfile creates a small dumpfile.On
x86_64kernel which compiled withCONFIG_PHYSICAL_START=0x0andCONFIG_RELOCATABLE=y, makedumpfile fails like the following:# makedumpfile -d31 /proc/vmcore dumpfile The kernel version is not supported. The created dumpfile may be incomplete. _exclude_free_page: Can't get next online node.makedumpfile Failed.
#The cause is the lack of the symbol "
phys_base" in a vmcoreinfo data. If the symbol "phys_base" does not exist, makedumpfile considers anx86_64kernel as non relocatable. As the result, makedumpfile misunderstands the physical address where the kernel is loaded, and it cannot translate a kernel virtual address to physical address correctly. To fix this proble, the attached patch which adds the symbol "phys_base" to a vmcoreinfo data.Thanks
Ken'ichi OhmichiSigned-off-by Ken'ichi Ohmichi <[email protected]>---
diff -rpuNlinux-2.6.25-rc7.orig/arch/x86/kernel/machine_kexec_64.clinux-2.6.25-rc7/arch/x86/kernel/machine_kexec_64.carch/x86/kernel/machine_kexec_64.c NORET_TYPE void machine_kexec(struct kim · line 237
Quoted 5 lines
arch/x86/kernel/machine_kexec_64.c +1
-0@@ -233,6 +233,7 @@ NORET_TYPE void machine_kexec(struct kimvoid arch_crash_save_vmcoreinfo (void ) { +VMCOREINFO_SYMBOL (phys_base);VMCOREINFO_SYMBOL (init_level4_pgt);CCing to LKML.
Quoted 7 lines
Looks good to me. Given a vmcore file, one needs to know about the shift between compile address and run time address of kernel to be able to do filtering. This shift (
phys_base) will vary based on kernel config options and based on where boot loader has loaded a kernel.Acked-by Vivek Goyal <[email protected]>
Thank you so much for your review and "Acked-by" :-)
Thanks
Ken'ichi Ohmichi
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec