linux/arch/arm/kernel
Russell King d5996b2ff0 ARM: fix /proc/$PID/stack on SMP
Rabin Vincent reports:
| On SMP, this BUG() in save_stack_trace_tsk() can be easily triggered
| from user space by reading /proc/$PID/stack, where $PID is any pid but
| the current process:
|
|	if (tsk != current) {
| #ifdef CONFIG_SMP
|		/*
|		 * What guarantees do we have here that 'tsk'
|		 * is not running on another CPU?
|		 */
|		BUG();
| #else

Fix this by replacing the BUG() with an entry to terminate the stack
trace, returning an empty trace - I'd rather not expose the dwarf
unwinder to a volatile stack of a running thread.

Reported-by: Rabin Vincent <rabin@rab.in>
Tested-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-15 09:27:04 +00:00
..
.gitignore
armksyms.c
arthur.c
asm-offsets.c
atags.c
atags.h
bios32.c
calls.S
compat.c
compat.h
crash_dump.c
crunch-bits.S
crunch.c
debug.S
dma-isa.c
dma.c
early_printk.c
ecard.c
ecard.h
elf.c
entry-armv.S Merge branch 'devel-stable' into devel 2011-01-06 22:33:32 +00:00
entry-common.S Merge branch 'clksrc' into devel 2011-01-05 18:09:03 +00:00
entry-header.S
etm.c
fiq.c Merge branch 'smp' into misc 2011-01-06 22:32:03 +00:00
ftrace.c
head-common.S
head-nommu.S
head.S Merge branch 'misc' into devel 2011-01-06 22:32:52 +00:00
hw_breakpoint.c
init_task.c
io.c
irq.c Merge branch 'misc' into devel 2011-01-06 22:32:52 +00:00
isa.c
iwmmxt.S
kgdb.c
kprobes-decode.c
kprobes.c
leds.c
machine_kexec.c
Makefile Merge branch 'devel-stable' into devel 2011-01-06 22:33:32 +00:00
module.c
perf_event_v6.c
perf_event_v7.c
perf_event_xscale.c
perf_event.c Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-01-06 16:50:35 -08:00
pj4-cp0.c
pmu.c
process.c ARM: 6619/1: nommu: avoid mapping vectors page when !CONFIG_MMU 2011-01-11 17:32:24 +00:00
ptrace.c
ptrace.h
relocate_kernel.S
return_address.c
sched_clock.c ARM: sched_clock: make minsec argument to clocks_calc_mult_shift() zero 2011-01-11 16:44:02 +00:00
setup.c ARM: 6625/1: use memblock memory regions for "System RAM" I/O resources 2011-01-14 22:14:04 +00:00
signal.c
signal.h
smp_scu.c
smp_tlb.c
smp_twd.c ARM: twd: fix display of twd frequency 2011-01-11 12:11:01 +00:00
smp.c Merge branch 'pgt' (early part) into devel 2011-01-06 22:33:19 +00:00
stacktrace.c ARM: fix /proc/$PID/stack on SMP 2011-01-15 09:27:04 +00:00
swp_emulate.c
sys_arm.c
sys_oabi-compat.c
tcm.c
tcm.h
thumbee.c
time.c ARM: sched_clock: allow init_sched_clock() to be called early 2011-01-11 16:23:04 +00:00
traps.c Merge branch 'pgt' (early part) into devel 2011-01-06 22:33:19 +00:00
unwind.c
vmlinux.lds.S Merge branch 'misc' into devel 2011-01-06 22:32:52 +00:00
xscale-cp0.c