linux/arch/powerpc
Benjamin Herrenschmidt 6c16a74d42 powerpc/mm: Fix potential access to freed pages when using hugetlbfs
When using 64k page sizes, our PTE pages are split in two halves,
the second half containing the "extension" used to keep track of
individual 4k pages when not using HW 64k pages.

However, our page tables used for hugetlb have a slightly different
format and don't carry that "second half".

Our code that batched PTEs to be invalidated unconditionally reads
the "second half" (to put it into the batch), which means that when
called to invalidate hugetlb PTEs, it will access unrelated memory.

It breaks when CONFIG_DEBUG_PAGEALLOC is enabled.

This fixes it by only accessing the second half when the _PAGE_COMBO
bit is set in the first half, which indicates that we are dealing with
a "combo" page which represents 16x4k subpages. Anything else shouldn't
have this bit set and thus not require loading from the second half.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-06-26 16:55:36 +10:00
..
boot powerpc/amigaone: Limit ISA I/O range to 4k in the device tree 2009-06-26 14:37:23 +10:00
configs Merge commit 'origin/master' into next 2009-06-17 10:24:53 +10:00
include/asm powerpc/mm: Fix potential access to freed pages when using hugetlbfs 2009-06-26 16:55:36 +10:00
kernel powerpc/440: Fix warning early debug code 2009-06-26 16:55:35 +10:00
kvm powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
lib powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm powerpc/mm: Make k(un)map_atomic out of line 2009-06-26 14:37:25 +10:00
oprofile powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
platforms powerpc/pasemi: Use raw spinlock in SMP TB sync 2009-06-26 16:55:34 +10:00
sysdev powerpc: Fix mpic alloc warning 2009-06-26 14:37:24 +10:00
xmon powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
Kconfig powerpc: Add irqtrace support for 32-bit powerpc 2009-06-26 14:37:27 +10:00
Kconfig.debug powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
Makefile powerpc: Move VMX and VSX asm code to vector.S 2009-06-09 16:46:25 +10:00