public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/3] Add prog_kfunc feature probe
@ 2025-01-24 14:44 Tao Chen
  2025-01-24 14:44 ` [PATCH bpf-next v3 1/3] libbpf: Refactor libbpf_probe_bpf_helper Tao Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Tao Chen @ 2025-01-24 14:44 UTC (permalink / raw)
  To: ast, daniel, andrii, eddyz87, haoluo, jolsa, qmo
  Cc: bpf, linux-kernel, chen.dylane

More and more kfunc functions are being added to the kernel.
Different prog types have different restrictions when using kfunc.
Therefore, prog_kfunc probe is added to check whether it is supported,
and the use of this api will be added to bpftool later.

Change list:
- v2 -> v3:
  - rename parameter off with btf_fd
  - extract the common part for libbpf_probe_bpf_{helper,kfunc}
- v2
  https://lore.kernel.org/bpf/20250123170555.291896-1-chen.dylane@gmail.com

- v1 -> v2:
  - check unsupported prog type like probe_bpf_helper
  - add off parameter for module btf
  - check verifier info when kfunc id invalid
- v1
  https://lore.kernel.org/bpf/20250122171359.232791-1-chen.dylane@gmail.com

Tao Chen (3):
  libbpf: Refactor libbpf_probe_bpf_helper
  libbpf: Add libbpf_probe_bpf_kfunc API
  selftests/bpf: Add libbpf_probe_bpf_kfunc API selftests

 tools/lib/bpf/libbpf.h                        | 17 ++++-
 tools/lib/bpf/libbpf.map                      |  1 +
 tools/lib/bpf/libbpf_probes.c                 | 68 +++++++++++++++----
 .../selftests/bpf/prog_tests/libbpf_probes.c  | 35 ++++++++++
 4 files changed, 108 insertions(+), 13 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-01-25 15:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-24 14:44 [PATCH bpf-next v3 0/3] Add prog_kfunc feature probe Tao Chen
2025-01-24 14:44 ` [PATCH bpf-next v3 1/3] libbpf: Refactor libbpf_probe_bpf_helper Tao Chen
2025-01-24 16:26   ` Jiri Olsa
2025-01-25 14:52     ` Tao Chen
2025-01-24 18:44   ` Andrii Nakryiko
2025-01-25 15:05     ` Tao Chen
2025-01-24 14:44 ` [PATCH bpf-next v3 2/3] libbpf: Add libbpf_probe_bpf_kfunc API Tao Chen
2025-01-24 16:27   ` Jiri Olsa
2025-01-25 14:54     ` Tao Chen
2025-01-24 18:46   ` Andrii Nakryiko
2025-01-24 14:44 ` [PATCH bpf-next v3 3/3] selftests/bpf: Add libbpf_probe_bpf_kfunc API selftests Tao Chen
2025-01-24 16:27   ` Jiri Olsa
2025-01-25 14:56     ` Tao Chen
2025-01-24 18:48   ` Andrii Nakryiko
2025-01-25 15:07     ` Tao Chen

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