tmp_suning_uos_patched/arch/x86/mm
Andi Kleen e213e87785 x86: Fix ioremap off by one BUG
Jean Delvare's machine triggered this BUG

acpi_os_map_memory phys ffff0000 size 65535
------------[ cut here ]------------
kernel BUG at arch/x86/mm/pat.c:233!

with ACPI in the backtrace.

Adding some debugging output showed that ACPI calls

acpi_os_map_memory phys ffff0000 size 65535

And ioremap/PAT does this check in 32bit, so addr+size wraps and the BUG
in reserve_memtype() triggers incorrectly.

        BUG_ON(start >= end); /* end is exclusive */

But reserve_memtype already uses u64:

int reserve_memtype(u64 start, u64 end,

so the 32bit truncation must happen in the caller. Presumably in ioremap
when it passes this information to reserve_memtype().

This patch does this computation in 64bit.

http://bugzilla.kernel.org/show_bug.cgi?id=11346

Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-08-15 18:18:38 +02:00
..
discontig_32.c mm: move bootmem descriptors definition to a single place 2008-07-24 10:47:14 -07:00
dump_pagetables.c x86: add PTE_FLAGS_MASK 2008-07-22 10:43:45 +02:00
extable.c
fault.c
gup.c Fix 'get_user_pages_fast()' with non-page-aligned start address 2008-07-28 17:54:21 -07:00
highmem_32.c
hugetlbpage.c x86: add hugepagesz option on 64-bit 2008-07-24 10:47:19 -07:00
init_32.c
init_64.c x86: use generic show_mem() 2008-07-26 12:00:10 -07:00
ioremap.c x86: Fix ioremap off by one BUG 2008-08-15 18:18:38 +02:00
k8topology_64.c
kmmio.c
Makefile mm: Make generic weak get_user_pages_fast and EXPORT_GPL it 2008-08-12 17:52:53 +10:00
memtest.c
mmap.c
mmio-mod.c
numa_64.c mm: move bootmem descriptors definition to a single place 2008-07-24 10:47:14 -07:00
pageattr-test.c
pageattr.c
pat.c
pf_in.c
pf_in.h
pgtable_32.c x86: use generic show_mem() 2008-07-26 12:00:10 -07:00
pgtable.c x86: work around gcc 3.4.x bug 2008-08-11 18:44:02 +02:00
srat_32.c
srat_64.c
testmmiotrace.c