All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v1 0/8] resolve_btfids: Discover kfuncs from BTF ID sets
@ 2026-07-22 23:35 Ihor Solodrai
  2026-07-22 23:35 ` [PATCH bpf-next v1 1/8] resolve_btfids: Implement generic ensure_mem() to grow arrays Ihor Solodrai
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Ihor Solodrai @ 2026-07-22 23:35 UTC (permalink / raw)
  To: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Eduard Zingerman, Kumar Kartikeya Dwivedi
  Cc: Benjamin Tissoires, Jiri Kosina, Emil Tsalapatis, Jiri Olsa, bpf,
	linux-input, kernel-team

This series develops resolve_btfids in preparation for bringing
kernel-specific BTF transformations in tree, which will reduce kbuild
dependency on pahole's features.

resolve_btfids currently identifies kfuncs by reading the "bpf_kfunc"
decl tags pahole emits into vmlinux BTF. The series switches the
source of truth to the BTF ID sets registered with
BTF_KFUNCS_START()/END() in the kernel, which is the mechanism BPF
verifier uses.

The series is based on patches #5 and #6 from the original
"resolve_btfids: Implement BTF tags emission for kfuncs" series [1],
and includes a few significant additions. Particularly the build time
enforcement of kfunc flags consistency [2].

The series consists of:
  - patches #1-#3 implement supporting infrastructure for the proper
    kfunc discovery and deduplication
  - patches #4-#5 expose btf__find_by_name_kind_own() and use it to
    fix a latent bug in _impl func lookup
  - patch #6 fixes inconsistent kfunc flags for HID kfuncs
  - patch #7 implements kfunc discovery from BTF ID sets
  - patch #8 adds enforcement of kfunc flags consistency

The resolve_btfids selftests patches have landed earlier [3].

[1] https://lore.kernel.org/bpf/20260601221805.821394-1-ihor.solodrai@linux.dev/
[2] https://lore.kernel.org/bpf/9b2196dd-443b-4632-ae11-030cdbdc59b4@linux.dev/
[3] https://lore.kernel.org/bpf/20260617210619.1562858-1-ihor.solodrai@linux.dev/

---

Changes compared to [1]:
  - Drop the idempotency (ensure_*) machinery: assume valid input BTF (Andrii)
  - Use rbtree to store the kfuncs (Andrii)
  - Enforce full KF_* flag consistency as a build error (Eduard)
  - Various cleanups and nits (Andrii, Emil, Jiri)

---

Ihor Solodrai (8):
  resolve_btfids: Implement generic ensure_mem() to grow arrays
  resolve_btfids: Index BTF ID symbols by address
  resolve_btfids: Keep collected kfuncs in a rbtree
  libbpf: Export btf__find_by_name_kind_own()
  resolve_btfids: Fix the _impl lookup for module BTF
  HID: bpf: Make syscall kfunc flags match the struct_ops set
  resolve_btfids: Discover kfuncs from BTF ID sets
  resolve_btfids: Enforce consistent kfunc flags across BTF ID sets

 drivers/hid/bpf/hid_bpf_dispatch.c |  10 +-
 tools/bpf/resolve_btfids/main.c    | 275 ++++++++++++++++++-----------
 tools/lib/bpf/btf.h                |   2 +
 tools/lib/bpf/libbpf.map           |   1 +
 tools/lib/bpf/libbpf_internal.h    |   2 -
 5 files changed, 181 insertions(+), 109 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-07-23  0:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 23:35 [PATCH bpf-next v1 0/8] resolve_btfids: Discover kfuncs from BTF ID sets Ihor Solodrai
2026-07-22 23:35 ` [PATCH bpf-next v1 1/8] resolve_btfids: Implement generic ensure_mem() to grow arrays Ihor Solodrai
2026-07-22 23:48   ` sashiko-bot
2026-07-23  0:50     ` Ihor Solodrai
2026-07-22 23:35 ` [PATCH bpf-next v1 2/8] resolve_btfids: Index BTF ID symbols by address Ihor Solodrai
2026-07-22 23:35 ` [PATCH bpf-next v1 3/8] resolve_btfids: Keep collected kfuncs in a rbtree Ihor Solodrai
2026-07-22 23:50   ` sashiko-bot
2026-07-23  0:51     ` Ihor Solodrai
2026-07-22 23:35 ` [PATCH bpf-next v1 4/8] libbpf: Export btf__find_by_name_kind_own() Ihor Solodrai
2026-07-22 23:43   ` sashiko-bot
2026-07-23  0:45     ` Ihor Solodrai
2026-07-22 23:35 ` [PATCH bpf-next v1 5/8] resolve_btfids: Fix the _impl lookup for module BTF Ihor Solodrai
2026-07-23  0:46   ` bot+bpf-ci
2026-07-22 23:35 ` [PATCH bpf-next v1 6/8] HID: bpf: Make syscall kfunc flags match the struct_ops set Ihor Solodrai
2026-07-22 23:49   ` sashiko-bot
2026-07-23  0:52     ` Ihor Solodrai
2026-07-22 23:35 ` [PATCH bpf-next v1 7/8] resolve_btfids: Discover kfuncs from BTF ID sets Ihor Solodrai
2026-07-23  0:32   ` bot+bpf-ci
2026-07-23  0:57     ` Ihor Solodrai
2026-07-22 23:35 ` [PATCH bpf-next v1 8/8] resolve_btfids: Enforce consistent kfunc flags across " Ihor Solodrai
2026-07-23  0:32   ` bot+bpf-ci

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.