On Wed, Sep 03, 2008 at 02:01:59PM -0700, Jay Lan wrote: > Sometimes the kexec would allocate not enough memory for kdump kernel > itself on IA64 and caused kdump kernel to panic at boot. > > When it happens, the /proc/iomem would show a kernel RAM segment like > this: > 3014000000-3015294fff : System RAM > 3014000000-3014823ccf : Kernel code > 3014823cd0-3014dee8ef : Kernel data > 3014dee8f0-301529448f : Kernel bss > 3015295000-307bffdfff : System RAM > 3018000000-3037ffffff : Crash kernel > > But kexec would allocate memory 3018000000-3019290000 for the kernel, > which is 0x5000 smaller than the regular kernel. In my cases, the > physical_node_map and kern_memmap of the kdump kernel overlaped and > caused data corruption. > > This patch fixes the problem. The patch was generated against > kexec-tools 2.0.0 and tested in 2.6.27-rc4.
Hi Jay, I am unclear about why this underallocation occurs. > > Signed-off-by: Jay Lan <[EMAIL PROTECTED]> > > --- > kexec/arch/ia64/crashdump-ia64.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > Index: kexec-tools/kexec/arch/ia64/crashdump-ia64.c > =================================================================== > --- kexec-tools.orig/kexec/arch/ia64/crashdump-ia64.c 2008-09-03 > 11:24:14.289758063 -0700 > +++ kexec-tools/kexec/arch/ia64/crashdump-ia64.c 2008-09-03 > 11:29:34.095833316 -0700 > @@ -90,15 +90,15 @@ static void add_loaded_segments_info(str > phdr = &ehdr->e_phdr[i]; > if (phdr->p_type != PT_LOAD) > break; > - if (loaded_segments[loaded_segments_num].end != > - phdr->p_paddr & ~(ELF_PAGE_SIZE-1)) > - break; > + if (loaded_segments[loaded_segments_num].end < > + (phdr->p_paddr & ~(ELF_PAGE_SIZE-1)) ) > + loaded_segments[loaded_segments_num].end > + = phdr->p_paddr & ~(ELF_PAGE_SIZE-1); > loaded_segments[loaded_segments_num].end += > (phdr->p_memsz + ELF_PAGE_SIZE - 1) & > ~(ELF_PAGE_SIZE - 1); > i++; > } > - > loaded_segments_num++; > } > } > _______________________________________________ > kexec mailing list > [email protected] > http://lists.infradead.or CPU0 CPU1 1: 2119 0 Phys-irq i8042 6: 3 0 Phys-irq floppy 7: 0 0 Phys-irq parport0 9: 0 0 Phys-irq acpi 11: 0 0 Phys-irq ohci_hcd:usb1 12: 113 0 Phys-irq i8042 14: 115 0 Phys-irq ide0 16: 15 0 Phys-irq aic7xxx 17: 15 0 Phys-irq aic7xxx 18: 91384101 0 Phys-irq peth0 19: 78003861 0 Phys-irq cciss0 256: 308851801 0 Dynamic-irq timer0 257: 125228 0 Dynamic-irq resched0 258: 13 0 Dynamic-irq callfunc0 259: 0 167976 Dynamic-irq resched1 260: 0 106 Dynamic-irq callfunc1 261: 0 104557728 Dynamic-irq timer1 262: 2798 0 Dynamic-irq xenbus 263: 0 0 Dynamic-irq console 264: 14332996 0 Dynamic-irq blkif-backend 265: 460390 0 Dynamic-irq blkif-backend 266: 30363590 0 Dynamic-irq vif5.0 267: 819911 0 Dynamic-irq blkif-backend 268: 1 0 Dynamic-irq blkif-backend 269: 3558070 0 Dynamic-irq vif2.0 NMI: 0 0 LOC: 0 0 ERR: 0 MIS: 0 at 50060000 [disabled] [size=128K] Capabilities: [dc] Power Management version 2 Én nem látok ütközést. Köszi: Attesz _________________________________________________ linux lista - [email protected] http://mlf2.linux.rulez.org/mailman/listinfo/linux
