Skip to content

Commit 1395f89

Browse files
anakryikoKernel Patches Daemon
authored andcommitted
libbpf: fix powerpc's stack register definition in bpf_tracing.h
retsnoop's build on powerpc (ppc64le) architecture ([0]) failed due to wrong definition of PT_REGS_SP() macro. Looking at powerpc's implementation of stack unwinding in perf_callchain_user_64() clearly shows that stack pointer register is gpr[1]. Fix libbpf's definition of __PT_SP_REG for powerpc to fix all this. [0] https://kojipkgs.fedoraproject.org/work/tasks/1544/137921544/build.log Fixes: 138d615 ("samples/bpf: Enable powerpc support") Cc: Naveen N Rao <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]>
1 parent 2b803ce commit 1395f89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/lib/bpf/bpf_tracing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ struct pt_regs___arm64 {
311311
#define __PT_RET_REG regs[31]
312312
#define __PT_FP_REG __unsupported__
313313
#define __PT_RC_REG gpr[3]
314-
#define __PT_SP_REG sp
314+
#define __PT_SP_REG gpr[1]
315315
#define __PT_IP_REG nip
316316

317317
#elif defined(bpf_target_sparc)

0 commit comments

Comments
 (0)