public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/4] Switch from kfuncs to direct helper calls in prologue/epilogue
@ 2026-01-23 17:05 Jakub Sitnicki
  2026-01-23 17:05 ` [PATCH bpf-next v2 1/4] bpf, verifier: Support direct helper calls from prologue/epilogue Jakub Sitnicki
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jakub Sitnicki @ 2026-01-23 17:05 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Amery Hung, netdev, kernel-team, Martin KaFai Lau

This series enables direct helper calls using BPF_EMIT_CALL from prologue
and epilogue code generated by verifier ops. The goal is to simplify the
calling convention and remove kfunc support from prologue/epilogue, as
suggested by Alexei [1].

Patch 1 adds the infrastructure to mark direct helper calls as finalized
(already resolved) so the verifier skips the imm fixup.

Patch 2 converts bpf_qdisc to use BPF_EMIT_CALL instead of BPF_CALL_KFUNC
for the init prologue and reset/destroy epilogue helpers.

Patch 3 removes the corresponding selftests that exercised kfuncs in
prologue/epilogue.

Patch 4 removes the now-unused kfunc support code from prologue/epilogue
handling in the verifier.

[1] https://lore.kernel.org/bpf/CAADnVQJ=kmVAZsgkG9P2nEBTUG3E4PrDG=Yz8tfeFysH4ZBqVw@mail.gmail.com/

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
---
Changes in v2:
- Swap patch 3 & 4 to avoid selftests fails on bisect (Eduard)
- Rename is_epilogue flag to finalize_helper_calls (Eduard)
- Untie mark_helper_calls_finalized call from epilogue_idx (Eduard)
- Drop review tags for patch 1 after tweaks in patch_insn_buf (patch 1)
- s/__bpf_base_call/__bpf_call_base/ in doc comment (patch 1)
- Link to v1: https://lore.kernel.org/r/20260119-skb-meta-bpf-emit-call-from-prologue-v1-0-e8b88d6430d8@cloudflare.com

---
Jakub Sitnicki (4):
      bpf, verifier: Support direct helper calls from prologue/epilogue
      bpf: net_sched: Use direct helper calls instead of kfuncs in pro/epilogue
      selftests/bpf: Remove tests for prologue/epilogue with kfuncs
      bpf: Remove kfunc support in prologue and epilogue

 include/linux/bpf_verifier.h                       |  1 +
 kernel/bpf/verifier.c                              | 52 ++++++------
 net/core/filter.c                                  |  3 +-
 net/sched/bpf_qdisc.c                              | 76 ++++++++----------
 .../selftests/bpf/prog_tests/pro_epilogue.c        |  2 -
 .../selftests/bpf/progs/pro_epilogue_with_kfunc.c  | 88 ---------------------
 .../testing/selftests/bpf/test_kmods/bpf_testmod.c | 92 ----------------------
 7 files changed, 63 insertions(+), 251 deletions(-)


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

end of thread, other threads:[~2026-01-25 20:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 17:05 [PATCH bpf-next v2 0/4] Switch from kfuncs to direct helper calls in prologue/epilogue Jakub Sitnicki
2026-01-23 17:05 ` [PATCH bpf-next v2 1/4] bpf, verifier: Support direct helper calls from prologue/epilogue Jakub Sitnicki
2026-01-23 23:49   ` Martin KaFai Lau
2026-01-25 20:37     ` Jakub Sitnicki
2026-01-23 17:05 ` [PATCH bpf-next v2 2/4] bpf: net_sched: Use direct helper calls instead of kfuncs in pro/epilogue Jakub Sitnicki
2026-01-23 17:05 ` [PATCH bpf-next v2 3/4] selftests/bpf: Remove tests for prologue/epilogue with kfuncs Jakub Sitnicki
2026-01-23 17:05 ` [PATCH bpf-next v2 4/4] bpf: Remove kfunc support in prologue and epilogue Jakub Sitnicki
2026-01-23 19:30 ` [PATCH bpf-next v2 0/4] Switch from kfuncs to direct helper calls in prologue/epilogue patchwork-bot+netdevbpf

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