bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH dwarves v1 0/3] btf_encoder: support for BPF magic kernel functions
@ 2025-10-29 19:02 Ihor Solodrai
  2025-10-29 19:02 ` [PATCH dwarves v1 1/3] btf_encoder: refactor btf_encoder__add_func_proto Ihor Solodrai
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ihor Solodrai @ 2025-10-29 19:02 UTC (permalink / raw)
  To: dwarves, alan.maguire, acme; +Cc: bpf, andrii, ast, eddyz87, tj, kernel-team

This series implements BTF encoding of BPF kernel functions marked
with KF_MAGIC_ARGS flag in pahole.

The kfunc flag indicates that the arguments of a kfunc with __magic
suffix are implicitly set by the verifier, and so pahole must emit two
functions to BTF:
  * kfunc_impl() with the arguments matching kernel declaration
  * kfunc() with __magic arguments omitted

For more details see relevant patch series for BPF:
"bpf: magic kernel functions"

This series is built upon KF_IMPLICIT_PROG_AUX_ARG support [1],
although the approach changed signifcantly to call it a v2.

[1] https://lore.kernel.org/dwarves/20250924211512.1287298-1-ihor.solodrai@linux.dev/

Ihor Solodrai (3):
  btf_encoder: refactor btf_encoder__add_func_proto
  btf_encoder: factor out btf_encoder__add_bpf_kfunc()
  btf_encoder: support kfuncs with KF_MAGIC_ARGS flag

 btf_encoder.c | 292 ++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 222 insertions(+), 70 deletions(-)

-- 
2.51.1


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

end of thread, other threads:[~2025-11-14 18:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29 19:02 [PATCH dwarves v1 0/3] btf_encoder: support for BPF magic kernel functions Ihor Solodrai
2025-10-29 19:02 ` [PATCH dwarves v1 1/3] btf_encoder: refactor btf_encoder__add_func_proto Ihor Solodrai
2025-10-30  0:34   ` Eduard Zingerman
2025-10-29 19:02 ` [PATCH dwarves v1 2/3] btf_encoder: factor out btf_encoder__add_bpf_kfunc() Ihor Solodrai
2025-10-29 19:02 ` [PATCH dwarves v1 3/3] btf_encoder: support kfuncs with KF_MAGIC_ARGS flag Ihor Solodrai
2025-11-04 20:59 ` [PATCH dwarves v1 0/3] btf_encoder: support for BPF magic kernel functions Alan Maguire
2025-11-04 22:25   ` Ihor Solodrai
2025-11-04 22:33     ` Eduard Zingerman
2025-11-04 22:37       ` Ihor Solodrai
2025-11-14 18:33     ` Alan Maguire

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).