linux/arch
Ingo Molnar 23be8c7ddf x86: fix boot crash on HIGHMEM4G && SPARSEMEM
Denys Fedoryshchenko reported a bootup crash when he upgraded
his system from 3GB to 4GB RAM:

   http://lkml.org/lkml/2008/1/7/9

the bug is due to HIGHMEM4G && SPARSEMEM kernels making pfn_to_page()
to return an invalid pointer when the pfn is in a memory hole. The
256 MB PCI aperture at the end of RAM was not mapped by sparsemem,
and hence the pfn was not valid. But set_highmem_pages_init() iterated
this range without checking the pfn's validity first.

this bug was probably present in the sparsemem code ever since sparsemem
has been introduced in v2.6.13. It was masked due to HIGHMEM64G using
larger memory regions in sparsemem_32.h:

 #ifdef CONFIG_X86_PAE
 #define SECTION_SIZE_BITS       30
 #define MAX_PHYSADDR_BITS       36
 #define MAX_PHYSMEM_BITS        36
 #else
 #define SECTION_SIZE_BITS       26
 #define MAX_PHYSADDR_BITS       32
 #define MAX_PHYSMEM_BITS        32
 #endif

which creates 1GB sparsemem regions instead of 64MB sparsemem regions.
So in practice we only ever created true sparsemem holes on x86 with
HIGHMEM4G - but that was rarely used by distros.

( btw., we could probably save 2MB of mem_map[]s on X86_PAE if we reduced
  the sparsemem region size to 256 MB. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-15 16:44:37 +01:00
..
alpha alpha: build fixes 2007-12-17 19:28:16 -08:00
arm [ARM] vfp: fix fuitod/fsitod instructions 2008-01-10 17:07:08 +00:00
avr32 [AVR32] Fix wrong pt_regs in critical exception handler 2007-12-07 14:54:48 +01:00
blackfin Blackfin arch: fix bug when enable uart1 with uart0 disabled => no initial console 2007-11-21 17:04:41 +08:00
cris CRIS v10: driver for ds1302 needs to include cris-specific i2c.h 2008-01-14 08:52:23 -08:00
frv FRV: arrange things such that BRA can reach from the trap table 2007-11-29 09:24:54 -08:00
h8300 Kbuild/doc: fix links to Documentation files 2007-10-30 14:26:30 -07:00
ia64 [IA64] Update Altix nofault code 2008-01-03 13:22:54 -08:00
m32r m32r: Update sys_rt_sigsuspend 2007-11-28 01:24:04 +09:00
m68k m68k: export atari_keyb_init 2007-11-26 19:15:31 -08:00
m68knommu m68knommu: mark mem init functions as __init 2007-10-23 20:45:44 -07:00
mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2008-01-14 21:25:39 -08:00
parisc [PARISC] print more than one character at a time for pdc console 2007-12-06 09:32:15 -08:00
powerpc [POWERPC] Fix CPU hotplug when using the SLB shadow buffer 2008-01-11 16:33:55 +11:00
ppc [POWERPC] virtex bug fix: Use canonical value for AC97 interrupt xparams 2007-12-07 11:43:55 +11:00
s390 [S390] Make sure the restore psw masks are initialized. 2007-12-04 16:09:58 +01:00
sh sh: Support PCI IO access of SH7780 base boards. 2007-11-30 12:36:13 +09:00
sh64 sh64: Kill off duplicate includes. 2007-11-05 12:18:17 +09:00
sparc [SPARC32]: Spelling fixes 2007-12-20 13:55:45 -08:00
sparc64 [SPARC64]: Implement pci_resource_to_user() 2007-12-26 19:33:46 -08:00
um uml: user of helper_wait() got missed when it got extra arguments 2007-12-23 12:54:37 -08:00
v850 spelling fixes: arch/v850/ 2007-10-20 01:24:05 +02:00
x86 x86: fix boot crash on HIGHMEM4G && SPARSEMEM 2008-01-15 16:44:37 +01:00
xtensa [XTENSA]: Fix use of skb after netif_rx 2007-12-11 02:45:28 -08:00