linux-kernel-test/arch/x86
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
..
boot x86 setup: don't recalculate ss:esp unless really necessary 2007-11-28 18:17:17 -08:00
configs x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMU 2007-10-30 00:22:22 +01:00
crypto x86: merge arch/x86/crypto Makefiles 2007-10-23 22:37:23 +02:00
ia32 x86 - 32-bit ptrace emulation mishandles 6th arg 2007-11-10 04:30:36 +01:00
kernel Kick CPUS that might be sleeping in cpus_idle_wait 2008-01-14 08:52:22 -08:00
lguest lguest: prevent VISWS or VOYAGER randconfigs 2007-11-29 09:24:55 -08:00
lib x86: disable preemption in delay_tsc() 2007-11-14 18:45:44 -08:00
mach-default spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
mach-es7000 i386: es7000 minor cleanups 2007-10-17 20:16:15 +02:00
mach-generic spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
mach-visws [x86] remove uses of magic macros for boot_params access 2007-10-16 17:38:31 -07:00
mach-voyager x86: fix smp init sections 2007-11-17 16:27:00 +01:00
math-emu kbuild: fix up CFLAGS usage 2007-10-14 21:49:42 +02:00
mm x86: fix boot crash on HIGHMEM4G && SPARSEMEM 2008-01-15 16:44:37 +01:00
oprofile oprofile: op_model_athlon.c support for AMD family 10h barcelona performance counters 2007-12-18 18:05:58 +01:00
pci Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 2007-11-26 19:41:28 -08:00
power i386: move power 2007-10-11 11:16:34 +02:00
vdso x86: ignore the sys_getcpu() tcache parameter 2007-11-17 16:27:00 +01:00
video i386: move video 2007-10-11 11:16:56 +02:00
xen xen: relax signature check 2007-12-10 19:46:58 -08:00
Kconfig Tiny clean-up of OPROFILE/KPROBES configuration 2007-12-06 09:41:12 -08:00
Kconfig.cpu x86: arch/x86/Kconfig.cpu unification 2007-11-12 21:02:19 +01:00
Kconfig.debug remove the dead X86_REMOTE_DEBUG option 2007-10-30 00:22:22 +01:00
Makefile x86: correctly set UTS_MACHINE for "make ARCH=x86" 2007-11-26 17:38:53 -08:00
Makefile_32 x86: do not use $(ARCH) when not needed 2007-11-12 21:02:20 +01:00
Makefile_32.cpu x86: move i386 and x86_64 Makefiles to arch/x86 2007-10-25 22:27:34 +02:00
Makefile_64 x86: do not use $(ARCH) when not needed 2007-11-12 21:02:20 +01:00