Commit d51959d7 authored by Anton Blanchard's avatar Anton Blanchard

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: default avatarAnton Blanchard <anton@samba.org>
parent 6403105b
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
*/ */
#define TRACE_WITH_FRAME_BUFFER(func) \ #define TRACE_WITH_FRAME_BUFFER(func) \
mflr r0; \ mflr r0; \
stdu r1, -32(r1); \ stdu r1, -STACK_FRAME_OVERHEAD(r1); \
std r0, 16(r1); \ std r0, 16(r1); \
stdu r1, -32(r1); \ stdu r1, -STACK_FRAME_OVERHEAD(r1); \
bl func; \ bl func; \
ld r1, 0(r1); \ ld r1, 0(r1); \
ld r1, 0(r1); ld r1, 0(r1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment