linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] bpf: Allow get_func_[arg|arg_cnt] helpers in raw tracepoint programs
@ 2025-04-26 16:00 KaFai Wan
  2025-04-26 16:00 ` [PATCH bpf-next 1/4] " KaFai Wan
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: KaFai Wan @ 2025-04-26 16:00 UTC (permalink / raw)
  To: song, jolsa, ast, daniel, andrii, martin.lau, eddyz87,
	yonghong.song, john.fastabend, kpsingh, sdf, haoluo,
	mattbobrowski, rostedt, mhiramat, mathieu.desnoyers, davem,
	edumazet, kuba, pabeni, horms, mykolal, shuah
  Cc: linux-kernel, bpf, linux-trace-kernel, netdev, linux-kselftest,
	leon.hwang, mannkafai

hi, 

We can use get_func_[arg|arg_cnt] helpers in fentry/fexit/fmod_ret programs
currently[1]. But they can't be used in raw_tp/tp_btf programs.

Adding support to use get_func_[arg|arg_cnt] helpers in raw_tp/tp_btf
programs.
Adding BPF_PROG_TEST_RUN for tp_btf.
Add selftests to check them.

Thanks,
KaFai

[1] https://lore.kernel.org/bpf/20211208193245.172141-1-jolsa@kernel.org/
---
KaFai Wan (4):
  bpf: Allow get_func_[arg|arg_cnt] helpers in raw tracepoint programs
  bpf: Enable BPF_PROG_TEST_RUN for tp_btf
  selftests/bpf: Add raw_tp_test_run for tp_btf
  selftests/bpf: Add tests for get_func_[arg|arg_cnt] helpers in raw
    tracepoint programs

 kernel/trace/bpf_trace.c                      | 17 +++++--
 net/bpf/test_run.c                            | 16 +++----
 .../bpf/prog_tests/raw_tp_get_func_args.c     | 48 +++++++++++++++++++
 .../bpf/prog_tests/raw_tp_test_run.c          | 18 ++++++-
 .../bpf/progs/test_raw_tp_get_func_args.c     | 47 ++++++++++++++++++
 .../bpf/progs/test_raw_tp_test_run.c          | 16 +++++--
 6 files changed, 146 insertions(+), 16 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/raw_tp_get_func_args.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_raw_tp_get_func_args.c

-- 
2.43.0


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

end of thread, other threads:[~2025-05-12 16:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-26 16:00 [PATCH bpf-next 0/4] bpf: Allow get_func_[arg|arg_cnt] helpers in raw tracepoint programs KaFai Wan
2025-04-26 16:00 ` [PATCH bpf-next 1/4] " KaFai Wan
2025-04-30  2:46   ` Alexei Starovoitov
2025-04-30 12:43     ` Kafai Wan
2025-04-30 15:54       ` Leon Hwang
2025-04-30 16:53         ` Alexei Starovoitov
2025-05-02 14:25           ` Leon Hwang
2025-05-06 21:01             ` Andrii Nakryiko
2025-05-12 11:12               ` Leon Hwang
2025-05-12 15:25                 ` Alexei Starovoitov
2025-05-12 16:01                   ` Leon Hwang
2025-05-01 20:53       ` Andrii Nakryiko
2025-04-26 16:00 ` [PATCH bpf-next 2/4] bpf: Enable BPF_PROG_TEST_RUN for tp_btf KaFai Wan
2025-05-01 20:55   ` Andrii Nakryiko
2025-04-26 16:00 ` [PATCH bpf-next 3/4] selftests/bpf: Add raw_tp_test_run " KaFai Wan
2025-04-26 16:00 ` [PATCH bpf-next 4/4] selftests/bpf: Add tests for get_func_[arg|arg_cnt] helpers in raw tracepoint programs KaFai Wan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).