Skip to contentSkip to conversation

libbpf: Fix arm syscall regs spec in bpf_tracing.h

PATCH Superseded Puranjay Mohan 1 participant 1 message Feb 23, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libbpf: Fix arm syscall regs spec in bpf_tracing.h

From: Puranjay Mohan <[email protected]>

The syscall register definitions for ARM in bpf_tracing.h doesn't define the fifth parameter for the syscalls. Because of this some KPROBES based selftests fail to compile for ARM architecture.

Define the fifth parameter that is passed in the R5 register (uregs[4]).

Fixes 3a95c42d65d5 ("libbpf: Define arm syscall regs spec in bpf_tracing.h")
---
 tools/lib/bpf/bpf_tracing.h | 1 +
 1 file changed, 1 insertion(+)
tools/lib/bpf/bpf_tracing.h +1 -0
index 6db88f41fa0d..2cd888733b1c 100644
@@ -204,6 +204,7 @@ struct pt_regs___s390 {
 #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 uregs[4]
 #define __PT_PARM6_SYSCALL_REG uregs[5]
 #define __PT_PARM7_SYSCALL_REG uregs[6]
 
Signature · 1 line
2.39.1