aboutsummaryrefslogtreecommitdiff
path: root/tools/lib
diff options
context:
space:
mode:
authorIlya Leoshkevich <[email protected]>2022-02-09 03:17:39 +0100
committerAndrii Nakryiko <[email protected]>2022-02-08 21:16:14 -0800
commitf07f1503469b11b739892d50c836992ffbe026ee (patch)
tree0f3302ffb9d66df82dce9f6afc507d3e88421501 /tools/lib
parent3f928cab927c576f3385f3e828c53a95b2199f58 (diff)
libbpf: Fix accessing syscall arguments on powerpc
powerpc does not select ARCH_HAS_SYSCALL_WRAPPER, so its syscall handlers take "unpacked" syscall arguments. Indicate this to libbpf using PT_REGS_SYSCALL_REGS macro. Reported-by: Heiko Carstens <[email protected]> Signed-off-by: Ilya Leoshkevich <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Tested-by: Naveen N. Rao <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/bpf_tracing.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index a5e92656bfba..20bc63770c9f 100644
--- a/tools/lib/bpf/bpf_tracing.h
+++ b/tools/lib/bpf/bpf_tracing.h
@@ -180,6 +180,8 @@
#define __PT_RC_REG gpr[3]
#define __PT_SP_REG sp
#define __PT_IP_REG nip
+/* powerpc does not select ARCH_HAS_SYSCALL_WRAPPER. */
+#define PT_REGS_SYSCALL_REGS(ctx) ctx
#elif defined(bpf_target_sparc)