diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2022-02-09 03:17:39 +0100 |
---|---|---|
committer | Andrii Nakryiko <andrii.nakryiko@gmail.com> | 2022-02-09 09:48:32 -0800 |
commit | 8a28842a20788208ca60cebad2f48754df5d30ee (patch) | |
tree | 761b83ecb6b7444328d57e8c286864348fe3d38d | |
parent | 50b4d99bbc48b21fef19cb4255d41290b80f786e (diff) | |
download | libbpf-8a28842a20788208ca60cebad2f48754df5d30ee.tar.gz |
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 <hca@linux.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Link: https://lore.kernel.org/bpf/20220209021745.2215452-5-iii@linux.ibm.com
-rw-r--r-- | src/bpf_tracing.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bpf_tracing.h b/src/bpf_tracing.h index a5e9265..20bc637 100644 --- a/src/bpf_tracing.h +++ b/src/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) |