commit a5b76cbbbe0fb76270f7babce48bda9b8806f9ea
Author: Ken'ichi Ohmichi <[EMAIL PROTECTED]>
Date:   Wed Apr 2 23:15:03 2008 +0000

    vmcoreinfo: add the symbol "phys_base"
    
    upstream commit: 629c8b4cdb354518308663aff2f719e02f69ffbe
    
    Fix the problem that makedumpfile sometimes fails on x86_64 machine.
    
    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 problem, this patch adds the symbol "phys_base" to a
    vmcoreinfo data.
    
    Signed-off-by: Ken'ichi Ohmichi <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Acked-by: Vivek Goyal <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
    Signed-off-by: Chris Wright <[EMAIL PROTECTED]>

diff --git a/arch/x86/kernel/machine_kexec_64.c 
b/arch/x86/kernel/machine_kexec_64.c
index aa3d2c8..1f09cd9 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -233,6 +233,7 @@ NORET_TYPE void machine_kexec(struct kimage *image)
 
 void arch_crash_save_vmcoreinfo(void)
 {
+       VMCOREINFO_SYMBOL(phys_base);
        VMCOREINFO_SYMBOL(init_level4_pgt);
 
 #ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to