linux/arch/x86
Jan Beulich 5c0e6f035d x86: fix code paths used by update_mptable
Impact: fix crashes under Xen due to unrobust e820 code

find_e820_area_size() must return a properly distinguishable and
out-of-bounds value when it fails, and -1UL does not meet that
criteria on i386/PAE. Additionally, callers of the function must
check against that value.

early_reserve_e820() should be prepared for the region found to be
outside of the addressable range on 32-bits.

e820_update_range_map() should not blindly update e820, but should do
all it work on the map it got a pointer passed for (which in 50% of the
cases is &e820_saved). It must also not call e820_add_region(), as that
again acts on e820 unconditionally.

The issues were found when trying to make this option work in our Xen
kernel (i.e. where some of the silent assumptions made in the code
would not hold).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
LKML-Reference: <49B9171B.76E4.0078.0@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-03-13 02:37:19 +01:00
..
boot Merge branches 'x86/apic', 'x86/cpu', 'x86/fixmap', 'x86/mm', 'x86/sched', 'x86/setup-lzma', 'x86/signal' and 'x86/urgent' into x86/core 2009-03-04 02:22:31 +01:00
configs Merge branches 'x86/apic', 'x86/defconfig', 'x86/memtest', 'x86/mm' and 'linus' into x86/core 2009-02-26 06:31:32 +01:00
crypto
ia32 x86: ia32_signal: introduce {get|set}_user_seg() 2009-02-22 17:54:47 +01:00
include/asm x86, 32-bit: also use cpuinfo_x86's x86_{phys,virt}_bits members 2009-03-13 02:37:17 +01:00
kernel x86: fix code paths used by update_mptable 2009-03-13 02:37:19 +01:00
kvm KVM: VMX: Flush volatile msrs before emulating rdmsr 2009-02-15 02:47:39 +02:00
lguest Merge branches 'x86/cleanups', 'x86/kexec', 'x86/mce2' and 'linus' into x86/core 2009-03-11 10:49:15 +01:00
lib x86: use _types.h headers in asm where available 2009-02-13 11:35:01 -08:00
math-emu Merge branch 'x86/urgent' into x86/core 2009-03-05 21:48:50 +01:00
mm x86: move save_mr() into .meminit.text 2009-03-13 02:37:18 +01:00
oprofile x86: oprofile: don't set counter width from cpuid on Core2 2009-03-03 12:04:22 +01:00
pci x86, apic: remove genapic.h 2009-02-17 17:52:44 +01:00
power x86: use _types.h headers in asm where available 2009-02-13 11:35:01 -08:00
vdso x86, mm: rename TASK_SIZE64 => TASK_SIZE_MAX 2009-02-21 00:09:44 +01:00
video
xen Merge branch 'x86/core' into core/percpu 2009-03-04 02:29:19 +01:00
Kconfig x86, 32-bit: also limit NODES_HIGH_SHIFT here 2009-03-13 02:37:17 +01:00
Kconfig.cpu Merge branch 'x86/urgent' into core/percpu 2009-02-10 00:41:02 +01:00
Kconfig.debug Merge branch 'linus' into x86/apic 2009-02-22 20:05:19 +01:00
Makefile Merge branch 'core/percpu' into x86/core 2009-02-13 09:45:09 +01:00
Makefile_32.cpu