1
linux/include/asm-powerpc
David Gibson 86df864249 Correct hash flushing from huge_ptep_set_wrprotect()
As Andy Whitcroft recently pointed out, the current powerpc version of
huge_ptep_set_wrprotect() has a bug.  It just calls ptep_set_wrprotect()
which in turn calls pte_update() then hpte_need_flush() with the 'huge'
argument set to 0.  This will cause hpte_need_flush() to flush the wrong
hash entries (of any).  Andy's fix for this is already in the powerpc
tree as commit 016b33c495.

I have confirmed this is a real bug, not masked by some other
synchronization, with a new testcase for libhugetlbfs.  A process write
a (MAP_PRIVATE) hugepage mapping, fork(), then alter the mapping and
have the child incorrectly see the second write.

Therefore, this should be fixed for 2.6.26, and for the stable tree.
Here is a suitable patch for 2.6.26, which I think will also be suitable
for the stable tree (neither of the headers in question has been changed
much recently).

It is cut down slighlty from Andy's original version, in that it does
not include a 32-bit version of huge_ptep_set_wrprotect().  Currently,
hugepages are not supported on any 32-bit powerpc platform.  When they
are, a suitable 32-bit version can be added - the only 32-bit hardware
which supports hugepages does not use the conventional hashtable MMU and
so will have different needs anyway.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-08 09:27:58 -07:00
..
iseries
8xx_immap.h
8253pit.h
a.out.h
abs_addr.h
agp.h
asm-compat.h
atomic.h
auxvec.h
backlight.h
bitops.h
bootx.h
btext.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
cell-pmu.h
cell-regs.h
checksum.h
clk_interface.h
compat.h
cpm1.h
cpm2.h
cpm.h
cputable.h
cputhreads.h
cputime.h
current.h
dbdma.h
dcr-mmio.h
dcr-native.h
dcr-regs.h
dcr.h
delay.h
device.h
div64.h
dma-mapping.h
dma.h
edac.h
eeh_event.h
eeh.h
elf.h
emergency-restart.h
errno.h
exception.h
fb.h
fcntl.h
firmware.h
fixmap.h
floppy.h
fs_pd.h
fsl_lbc.h
futex.h asm-*/futex.h should include linux/uaccess.h 2008-04-30 08:29:52 -07:00
gpio.h
grackle.h
hardirq.h
heathrow.h
highmem.h
hugetlb.h Correct hash flushing from huge_ptep_set_wrprotect() 2008-07-08 09:27:58 -07:00
hvcall.h
hvconsole.h
hvcserver.h
hw_irq.h
hydra.h
i8259.h
ibmebus.h
ide.h
immap_86xx.h
immap_cpm2.h
immap_qe.h
io-defs.h
io.h [POWERPC] Add "memory" clobber to MMIO accessors 2008-05-31 17:08:28 +10:00
ioctl.h
ioctls.h
iommu.h
ipcbuf.h
ipic.h
irq_regs.h
irq.h
irqflags.h
Kbuild kbuild: fix a.out.h export to userspace with O= build. 2008-06-27 23:13:54 +02:00
kdebug.h
kdump.h
kexec.h
keylargo.h
kgdb.h
kmap_types.h
kprobes.h
kvm_asm.h
kvm_host.h KVM: ppc: Handle guest idle by emulating MSR[WE] writes 2008-05-04 14:44:44 +03:00
kvm_para.h
kvm_ppc.h KVM: ppc: Remove duplicate function 2008-06-06 21:22:09 +03:00
kvm.h
libata-portmap.h
linkage.h
lmb.h
local.h
lppaca.h
lv1call.h
machdep.h
macio.h
mc146818rtc.h
mediabay.h [POWERPC] Build fix for drivers/macintosh/mediabay.c 2008-06-16 15:00:47 +10:00
mman.h
mmu_context.h
mmu-8xx.h
mmu-40x.h
mmu-44x.h
mmu-fsl-booke.h
mmu-hash32.h
mmu-hash64.h [POWERPC] vmemmap fixes to use smaller pages 2008-05-15 20:49:25 +10:00
mmu.h
mmzone.h
module.h
mpc8xx.h
mpc52xx_psc.h
mpc52xx.h
mpc86xx.h
mpc512x.h
mpc8260.h
mpic.h [POWERPC] mpic: Fix use of uninitialized variable 2008-05-23 16:15:37 +10:00
msgbuf.h
mutex.h
namei.h
nvram.h
of_device.h
of_platform.h
ohare.h
oprofile_impl.h
paca.h
page_32.h
page_64.h
page.h
param.h
parport.h
pasemi_dma.h
pci-bridge.h
pci.h
percpu.h
pgalloc-32.h
pgalloc-64.h
pgalloc.h
pgtable-4k.h
pgtable-64k.h
pgtable-ppc32.h [POWERPC] 4xx: Fix problem with new TLB storage attibute fields on 440x6 core 2008-05-06 10:36:20 -05:00
pgtable-ppc64.h Correct hash flushing from huge_ptep_set_wrprotect() 2008-07-08 09:27:58 -07:00
pgtable.h
phyp_dump.h
pmac_feature.h
pmac_low_i2c.h
pmac_pfunc.h
pmc.h
pmi.h
poll.h
posix_types.h
ppc4xx.h
ppc_asm.h
ppc-pci.h
processor.h
prom.h
ps3.h [POWERPC] PS3: Make ps3_virq_setup and ps3_virq_destroy static 2008-05-02 15:00:44 +10:00
ps3av.h
ps3fb.h
ps3stor.h
pSeries_reconfig.h
ptrace.h
qe_ic.h
qe.h
reg_8xx.h
reg_booke.h
reg_fsl_emb.h
reg.h
resource.h
rheap.h
rio.h
rtas.h
rtc.h
rwsem.h
scatterlist.h
seccomp.h
sections.h
semaphore.h
sembuf.h
serial.h
setjmp.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h
smu.h
socket.h
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h
spu_csa.h powerpc/spufs: remove class_0_dsisr from spu exception handling 2008-06-16 14:35:00 +10:00
spu_info.h
spu_priv1.h
spu.h powerpc/spufs: remove class_0_dsisr from spu exception handling 2008-06-16 14:35:00 +10:00
sstep.h
stat.h
statfs.h
string.h
suspend.h
synch.h
syscalls.h unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
systbl.h
system.h [POWERPC] Fix rmb to order cacheable vs. noncacheable 2008-06-16 15:00:20 +10:00
tce.h
termbits.h
termios.h
thread_info.h
time.h
timex.h
tlb.h
tlbflush.h
topology.h
tsi108_irq.h
tsi108_pci.h
tsi108.h
types.h powerpc: types: use <asm-generic/int-*.h> for the powerpc architecture 2008-05-02 16:18:35 -07:00
uaccess.h [POWERPC] Fix uninitialized variable bug in copy_{to|from}_user 2008-05-15 20:49:52 +10:00
ucc_fast.h
ucc_slow.h
ucc.h
ucontext.h
udbg.h
uic.h
unaligned.h kernel: Move arches to use common unaligned access 2008-04-29 08:06:27 -07:00
uninorth.h
unistd.h
user.h
vdso_datapage.h
vdso.h
vga.h
vio.h
xilinx_intc.h
xmon.h
xor.h