[ARM] 5558/1: Add extra checks to ARM unwinder to avoid tracing corrupt stacks
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 19 Jun 2009 15:42:11 +0000 (16:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 19 Jun 2009 15:44:22 +0000 (16:44 +0100)
There are situations where the unwinder goes beyond stack boundaries and
unwinds random data. This patch moves the stack boundaries check after
the unwind_exec_insn() call and adds an extra check for possible
infinite loops (like "mov pc, lr" with pc == lr).

The patch also fixes a bug in the unwind instructions interpreter. The
0xb0 instruction can only set PC to LR if this wasn't already set by
a previous instruction (this is used on exceptions taken while in kernel
mode where svc_entry is annotated with ".save {r0 - pc}").

Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

No differences found