aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-03-09 21:51:58 -0400
committerAnton Blanchard <anton@samba.org>2014-04-22 20:05:25 -0400
commitd51959d70ffc55d1c829e881a6121e6fbbfb29af (patch)
treebfecc1c5d6272d549d66fb25113770d79602adeb
parent6403105bfda4d6934b39aeb85ff818b185b42de8 (diff)
powerpc/tracing: TRACE_WITH_FRAME_BUFFER creates invalid stack frames
TRACE_WITH_FRAME_BUFFER creates 32 byte stack frames. On ppc64 ABIv1 this is too small and a callee could corrupt the stack by writing to the parameter save area (starting at offset 48). Signed-off-by: Anton Blanchard <anton@samba.org>
-rw-r--r--arch/powerpc/include/asm/irqflags.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/irqflags.h b/arch/powerpc/include/asm/irqflags.h
index f62c056e75bf..e20eb95429a8 100644
--- a/arch/powerpc/include/asm/irqflags.h
+++ b/arch/powerpc/include/asm/irqflags.h
@@ -20,9 +20,9 @@
20 */ 20 */
21#define TRACE_WITH_FRAME_BUFFER(func) \ 21#define TRACE_WITH_FRAME_BUFFER(func) \
22 mflr r0; \ 22 mflr r0; \
23 stdu r1, -32(r1); \ 23 stdu r1, -STACK_FRAME_OVERHEAD(r1); \
24 std r0, 16(r1); \ 24 std r0, 16(r1); \
25 stdu r1, -32(r1); \ 25 stdu r1, -STACK_FRAME_OVERHEAD(r1); \
26 bl func; \ 26 bl func; \
27 ld r1, 0(r1); \ 27 ld r1, 0(r1); \
28 ld r1, 0(r1); 28 ld r1, 0(r1);