mbox series

[bpf-next,v2,0/4] Fix accessing first syscall argument on RV64

Message ID 20240831023646.1558629-1-pulehui@huaweicloud.com (mailing list archive)
Headers show
Series Fix accessing first syscall argument on RV64 | expand

Message

Pu Lehui Aug. 31, 2024, 2:36 a.m. UTC
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@linux.ibm.com [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(-)