BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] allow cpumask kfuncs in tracepoint, kprobe, perf event
@ 2024-08-26 22:48 JP Kobryn
  2024-08-26 22:48 ` [PATCH bpf-next v2 1/3] bpf: new btf kfunc hooks for tracepoint and " JP Kobryn
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: JP Kobryn @ 2024-08-26 22:48 UTC (permalink / raw)
  To: andrii, ast, eddyz87, bpf

It is possible to call a cpumask kfunc within a raw tp_btf program but not
possible within tracepoint, kprobe, or perf event programs. Currently, the
verifier receives -EACCESS from fetch_kfunc_meta() as a result of not
finding any kfunc hook associated with these program types.

This patch series adds new kfunc hooks and maps them to program types
where needed. The additional registration of the three program types
mentioned is done for the cpumask kfuncs allowing them to be called within
these types of programs.

Pre-submission CI run: https://github.com/kernel-patches/bpf/pull/7600

v2:
	- create new kfunc hooks for tracepoint and perf event
	- map tracepoint, and perf event prog types to kfunc hooks
	- register cpumask kfuncs with prog types in focus
	- expand existing verifier tests for cpumask kfuncs
v1:
	- map tracepoint type progs to tracing kfunc hook
	- new selftests for calling cpumask kfuncs in tracepoint prog
---
JP Kobryn (3):
  bpf: new btf kfunc hooks for tracepoint and perf event
  bpf: register additional prog types with cpumask kfuncs
  bpf/selftests: coverage for new program types using cpumask kfuncs

 kernel/bpf/btf.c                              |  6 +++++
 kernel/bpf/cpumask.c                          |  3 +++
 .../bpf/progs/verifier_kfunc_prog_types.c     | 24 +++++++++++++++++++
 3 files changed, 33 insertions(+)

-- 
2.46.0


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

end of thread, other threads:[~2024-08-31  2:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 22:48 [PATCH bpf-next v2 0/3] allow cpumask kfuncs in tracepoint, kprobe, perf event JP Kobryn
2024-08-26 22:48 ` [PATCH bpf-next v2 1/3] bpf: new btf kfunc hooks for tracepoint and " JP Kobryn
2024-08-27 21:01   ` Alexei Starovoitov
2024-08-27 22:42     ` Andrii Nakryiko
2024-08-28 19:08       ` JP Kobryn
2024-08-31  2:14         ` Alexei Starovoitov
2024-08-26 22:48 ` [PATCH bpf-next v2 2/3] bpf: register additional prog types with cpumask kfuncs JP Kobryn
2024-08-26 22:48 ` [PATCH bpf-next v2 3/3] bpf/selftests: coverage for new program types using " JP Kobryn

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