linux/arch
Ananth N Mavinakayanahalli 83db3dde26 [POWERPC] kprobes: Fix possible system crash during out-of-line single-stepping
- On archs that have no-exec support, we vmalloc() a executable scratch
area of PAGE_SIZE and divide it up into an array of slots of maximum
instruction size for that arch
- On a kprobe registration, the original instruction is copied to the
first available free slot, so if multiple kprobes are registered, chances
are, they get contiguous slots
- On POWER4, due to not having coherent icaches, we could hit a situation
where a probe that is registered on one processor, is hit immediately on
another. This second processor could have fetched the stream of text from
the out-of-line single-stepping area *before* the probe registration
completed, possibly due to an earlier (and a different) kprobe hit and
hence would see stale data at the slot.

Executing such an arbitrary instruction lead to a problem as reported
in LTC bugzilla 23555.

The correct solution is to call flush_icache_range() as soon as the
instruction is copied for out-of-line single-stepping, so the correct
instruction is seen on all processors.

Thanks to Will Schmidt who tracked this down.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Acked-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-17 16:41:10 +10:00
..
alpha [PATCH] arch/alpha: Use ARRAY_SIZE macro 2006-07-31 13:28:38 -07:00
arm [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name 2006-08-01 22:26:25 +01:00
arm26 [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
cris [PATCH] pcf8563: remove MOD_INC_USE_COUNT, MOD_DEC_USE_COUNT 2006-07-10 13:24:22 -07:00
frv [PATCH] FRV: Introduce asm-offsets for FRV arch 2006-07-10 13:24:22 -07:00
h8300 [PATCH] irq-flags: H8300: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
i386 [CPUFREQ] Propagate acpi_processor_preregister_performance return value. 2006-07-31 18:37:06 -04:00
ia64 [IA64] make uncached allocator more node aware 2006-08-04 10:27:27 -07:00
m32r [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
m68k [PATCH] irq-flags: M68K: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
m68knommu [PATCH] irq-flags: M68KNOMMU: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
mips [MIPS] sparsemem: fix crash in show_mem 2006-07-13 21:26:22 +01:00
parisc [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
powerpc [POWERPC] kprobes: Fix possible system crash during out-of-line single-stepping 2006-08-17 16:41:10 +10:00
ppc [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
s390 [PATCH] cpu hotplug: use hotplug version of registration in late inits 2006-07-31 13:28:39 -07:00
sh [PATCH] sh: fix proc file removal for superh store queue module 2006-08-06 08:57:48 -07:00
sh64 [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
sparc [SPARC]: Defer clock_probe to fs_initcall() 2006-07-27 22:08:01 -07:00
sparc64 [SPARC64]: Explicitly print return PC when the kernel fault PC is bogus. 2006-07-24 22:33:58 -07:00
um [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
v850 [PATCH] v850: call init_page_count() instead of set_page_count() 2006-07-31 13:28:38 -07:00
x86_64 [PATCH] Fix more per-cpu typos 2006-08-06 08:57:47 -07:00
xtensa [PATCH] panic_on_oops: remove ssleep() 2006-07-31 13:28:39 -07:00