linux-stable-rt/arch/powerpc/kernel
Michael Ellerman a2ceff5e55 [POWERPC] Fix missed hardware breakpoints across multiple threads
There is a bug in the powerpc DABR (data access breakpoint) handling,
which can result in us missing breakpoints if several threads are trying
to break on the same address.

The circumstances are that do_page_fault() calls do_dabr(), this clears
the DABR (sets it to 0) and sets up the signal which will report to
userspace that the DABR was hit. The do_signal() code will restore the DABR
value on the way out to userspace.

If we reschedule before calling do_signal(), __switch_to() will check the
cached DABR value and compare it to the new thread's value, if they match
we don't set the DABR in hardware.

So if two threads have the same DABR value, and we schedule from one to
the other after taking the interrupt for the first thread hitting the DABR,
the second thread will run without the DABR set in hardware.

The cleanest fix is to move the cache update into set_dabr(), that way we
can't forget to do it.

Reported-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-28 22:51:02 +11:00
..
vdso32
vdso64
Makefile [POWERPC] Remove generated files on make clean 2008-02-14 22:11:02 +11:00
align.c
asm-offsets.c Fix compilation of powerpc asm-offsets.c with old gcc 2008-02-07 14:54:45 -08:00
audit.c
btext.c
clock.c
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_pa6t.S
cpu_setup_ppc970.S
cputable.c
crash.c
crash_dump.c
dma_64.c
entry_32.S
entry_64.S
firmware.c
fpu.S
head_8xx.S [POWERPC] 8xx: fix swap 2008-03-07 08:42:28 -06:00
head_32.S
head_40x.S
head_44x.S
head_64.S
head_booke.h
head_fsl_booke.S
ibmebus.c
idle.c
idle_6xx.S
idle_power4.S
init_task.c
io.c
iomap.c
iommu.c
irq.c
isa-bridge.c
kprobes.c [POWERPC] Kill sparse warnings in kprobes 2008-02-20 13:33:37 +11:00
l2cr_6xx.S
legacy_serial.c
lparcfg.c
machine_kexec.c
machine_kexec_32.c
machine_kexec_64.c
misc.S
misc_32.S [POWERPC] Add __ucmpdi2 for 64-bit comparisons in 32-bit kernels 2008-03-13 09:39:55 +11:00
misc_64.S
module_32.c
module_64.c
msi.c
nvram_64.c
of_device.c
of_platform.c
paca.c
pci-common.c [POWERPC] Fix bogus test for unassigned PCI resources 2008-03-13 10:09:27 +11:00
pci_32.c
pci_64.c
pci_dn.c
pmc.c
ppc32.h
ppc_ksyms.c [POWERPC] Export empty_zero_page 2008-03-13 10:09:28 +11:00
proc_ppc64.c
process.c [POWERPC] Fix missed hardware breakpoints across multiple threads 2008-03-28 22:51:02 +11:00
prom.c [POWERPC] Fix dt_mem_next_cell() to read the full address 2008-02-20 13:33:37 +11:00
prom_init.c
prom_parse.c
ptrace.c [POWERPC] user_regset PTRACE_SETREGS regression fix 2008-03-20 10:10:56 +11:00
ptrace32.c
rio.c
rtas-proc.c
rtas-rtc.c
rtas.c
rtas_flash.c
rtas_pci.c
semaphore.c
setup-common.c
setup.h
setup_32.c
setup_64.c
signal.c
signal.h
signal_32.c
signal_64.c
smp-tbsync.c
smp.c
softemu8xx.c
suspend.c
swsusp.c
swsusp_32.S
swsusp_64.c
swsusp_asm64.S
sys_ppc32.c
syscalls.c
sysfs.c
systbl.S
systbl_chk.c
systbl_chk.sh
tau_6xx.c
time.c
traps.c
udbg.c
udbg_16550.c
vdso.c [POWERPC] vdso_do_func_patch{32,64}() must be __init 2008-02-14 22:11:02 +11:00
vecemu.c
vector.S
vio.c
vmlinux.lds.S