linux/arch
Tejun Heo e59a1bb2fd x86: fix pageattr handling for lpage percpu allocator and re-enable it
lpage allocator aliases a PMD page for each cpu and returns whatever
is unused to the page allocator.  When the pageattr of the recycled
pages are changed, this makes the two aliases point to the overlapping
regions with different attributes which isn't allowed and known to
cause subtle data corruption in certain cases.

This can be handled in simliar manner to the x86_64 highmap alias.
pageattr code should detect if the target pages have PMD alias and
split the PMD alias and synchronize the attributes.

pcpur allocator is updated to keep the allocated PMD pages map sorted
in ascending address order and provide pcpu_lpage_remapped() function
which binary searches the array to determine whether the given address
is aliased and if so to which address.  pageattr is updated to use
pcpu_lpage_remapped() to detect the PMD alias and split it up as
necessary from cpa_process_alias().

Jan Beulich spotted the original problem and incorrect usage of vaddr
instead of laddr for lookup.

With this, lpage percpu allocator should work correctly.  Re-enable
it.

[ Impact: fix subtle lpage pageattr bug and re-enable lpage ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Jan Beulich <JBeulich@novell.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
2009-06-22 11:56:24 +09:00
..
alpha Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
arm Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
avr32 Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
blackfin Blackfin: convert page/tlb to asm-generic 2009-06-18 21:42:30 -04:00
cris Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
frv Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
h8300 ptrace: remove PT_DTRACE from arch/h8300 2009-06-18 13:03:48 -07:00
ia64 Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
m32r Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
m68k Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
m68knommu ptrace: remove PT_DTRACE from m68k, m68knommu 2009-06-18 13:03:48 -07:00
microblaze Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
mips Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
mn10300 Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
parisc Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
powerpc Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
s390 Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
sh Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
sparc Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
um Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
x86 x86: fix pageattr handling for lpage percpu allocator and re-enable it 2009-06-22 11:56:24 +09:00
xtensa Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
.gitignore
Kconfig gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00