On RV64, as Ilya mentioned before [0], the first syscall parameter should be accessed through orig_a0 (see arch/riscv64/include/asm/syscall.h), otherwise it will cause selftests like bpf_syscall_macro, vmlinux, test_lsm, etc. to fail on RV64. Link: https://lore.kernel.org/bpf/20220209021745.2215452-1-iii@xxxxxxxxxxxxx [0] Pu Lehui (4): libbpf: Access first syscall argument with CO-RE direct read on s390 libbpf: Access first syscall argument with CO-RE direct read on arm64 selftests/bpf: Enable test_bpf_syscall_macro:syscall_arg1 on s390 and arm64 libbpf: Fix accessing first syscall argument on RV64 tools/lib/bpf/bpf_tracing.h | 17 ++++++++++++----- .../bpf/prog_tests/test_bpf_syscall_macro.c | 4 ---- 2 files changed, 12 insertions(+), 9 deletions(-) -- 2.34.1