projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6403105
)
powerpc/tracing: TRACE_WITH_FRAME_BUFFER creates invalid stack frames
author
Anton Blanchard
<anton@samba.org>
Mon, 10 Mar 2014 01:51:58 +0000
(12:51 +1100)
committer
Anton Blanchard
<anton@samba.org>
Wed, 23 Apr 2014 00:05:25 +0000
(10:05 +1000)
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>
arch/powerpc/include/asm/irqflags.h
patch
|
blob
|
history
diff --git
a/arch/powerpc/include/asm/irqflags.h
b/arch/powerpc/include/asm/irqflags.h
index f62c056e75bf3cbdd2a8ec36e22262783112fce9..e20eb95429a8233528fc93508b6bdd0b8ce3bc24 100644
(file)
--- a/
arch/powerpc/include/asm/irqflags.h
+++ b/
arch/powerpc/include/asm/irqflags.h
@@
-20,9
+20,9
@@
*/
#define TRACE_WITH_FRAME_BUFFER(func) \
mflr r0; \
- stdu r1, -
32(r1);
\
+ stdu r1, -
STACK_FRAME_OVERHEAD(r1);
\
std r0, 16(r1); \
- stdu r1, -
32(r1);
\
+ stdu r1, -
STACK_FRAME_OVERHEAD(r1);
\
bl func; \
ld r1, 0(r1); \
ld r1, 0(r1);