Skip to content

Commit

Permalink
libbpf: Define arm syscall regs spec in bpf_tracing.h
Browse files Browse the repository at this point in the history
Define explicit table of registers used for syscall argument passing.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230120200914.3008030-17-andrii@kernel.org
  • Loading branch information
Andrii Nakryiko authored and Daniel Borkmann committed Jan 23, 2023
1 parent e82b96a commit 3a95c42
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/lib/bpf/bpf_tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ struct pt_regs___s390 {
#define __PT_PARM2_REG uregs[1]
#define __PT_PARM3_REG uregs[2]
#define __PT_PARM4_REG uregs[3]

#define __PT_PARM1_SYSCALL_REG __PT_PARM1_REG
#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_PARM6_SYSCALL_REG uregs[5]
#define __PT_PARM7_SYSCALL_REG uregs[6]

#define __PT_RET_REG uregs[14]
#define __PT_FP_REG uregs[11] /* Works only with CONFIG_FRAME_POINTER */
#define __PT_RC_REG uregs[0]
Expand Down

0 comments on commit 3a95c42

Please sign in to comment.