public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/4] Fix accessing first syscall argument on RV64
@ 2024-08-31  4:19 Pu Lehui
  2024-08-31  4:19 ` [PATCH bpf-next v3 1/4] libbpf: Access first syscall argument with CO-RE direct read on s390 Pu Lehui
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Pu Lehui @ 2024-08-31  4:19 UTC (permalink / raw)
  To: bpf, linux-riscv, netdev, Andrii Nakryiko
  Cc: Björn Töpel, Ilya Leoshkevich, Alexei Starovoitov,
	Daniel Borkmann, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Puranjay Mohan, Palmer Dabbelt, Pu Lehui

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]

v3:
- Fix test case error.

v2: https://lore.kernel.org/all/20240831023646.1558629-1-pulehui@huaweicloud.com/
- Access first syscall argument with CO-RE direct read. (Andrii)

v1: https://lore.kernel.org/all/20240829133453.882259-1-pulehui@huaweicloud.com/

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 ----
 .../selftests/bpf/progs/bpf_syscall_macro.c     |  2 --
 3 files changed, 12 insertions(+), 11 deletions(-)

-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-10-01 11:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-31  4:19 [PATCH bpf-next v3 0/4] Fix accessing first syscall argument on RV64 Pu Lehui
2024-08-31  4:19 ` [PATCH bpf-next v3 1/4] libbpf: Access first syscall argument with CO-RE direct read on s390 Pu Lehui
2024-08-31  4:19 ` [PATCH bpf-next v3 2/4] libbpf: Access first syscall argument with CO-RE direct read on arm64 Pu Lehui
2024-08-31  7:26   ` Xu Kuohai
2024-08-31  7:57     ` Xu Kuohai
2024-09-04 20:06       ` Andrii Nakryiko
2024-09-05  2:39         ` Xu Kuohai
2024-09-04 20:21   ` Andrii Nakryiko
2024-09-05  6:42     ` Pu Lehui
2024-08-31  4:19 ` [PATCH bpf-next v3 3/4] selftests/bpf: Enable test_bpf_syscall_macro:syscall_arg1 on s390 and arm64 Pu Lehui
2024-09-04 20:21   ` Andrii Nakryiko
2024-08-31  4:19 ` [PATCH bpf-next v3 4/4] libbpf: Fix accessing first syscall argument on RV64 Pu Lehui
2024-09-04 20:30 ` [PATCH bpf-next v3 0/4] " patchwork-bot+netdevbpf
     [not found]   ` <CAEf4BzayV1ihbfSg4fv0AqSazVycXqCJp4dTq1pwRt5hmx7X4g@mail.gmail.com>
2024-09-05  0:03     ` Andrii Nakryiko
2024-09-05  2:26       ` Pu Lehui
2024-10-01 11:35 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox