Commit c1cc01a2 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Daniel Borkmann

libbpf: Define powerpc syscall regs spec in bpf_tracing.h

Define explicit table of registers used for syscall argument passing.
Note that 7th arg is supported on 32-bit powerpc architecture, by not on
powerpc64.
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230120200914.3008030-20-andrii@kernel.org
parent cfd0bbe9
...@@ -294,13 +294,24 @@ struct pt_regs___arm64 { ...@@ -294,13 +294,24 @@ struct pt_regs___arm64 {
#define __PT_PARM6_REG gpr[8] #define __PT_PARM6_REG gpr[8]
#define __PT_PARM7_REG gpr[9] #define __PT_PARM7_REG gpr[9]
#define __PT_PARM8_REG gpr[10] #define __PT_PARM8_REG gpr[10]
/* powerpc does not select ARCH_HAS_SYSCALL_WRAPPER. */
#define PT_REGS_SYSCALL_REGS(ctx) ctx
#define __PT_PARM1_SYSCALL_REG orig_gpr3
#define __PT_PARM2_SYSCALL_REG __PT_PARM2_REG
#define __PT_PARM3_SYSCALL_REG __PT_PARM3_REG
#define __PT_PARM4_SYSCALL_REG __PT_PARM4_REG
#define __PT_PARM5_SYSCALL_REG __PT_PARM5_REG
#define __PT_PARM6_SYSCALL_REG __PT_PARM6_REG
#if !defined(__arch64__)
#define __PT_PARM7_SYSCALL_REG __PT_PARM7_REG /* only powerpc (not powerpc64) */
#endif
#define __PT_RET_REG regs[31] #define __PT_RET_REG regs[31]
#define __PT_FP_REG __unsupported__ #define __PT_FP_REG __unsupported__
#define __PT_RC_REG gpr[3] #define __PT_RC_REG gpr[3]
#define __PT_SP_REG sp #define __PT_SP_REG sp
#define __PT_IP_REG nip #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) #elif defined(bpf_target_sparc)
......
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