mbox series

[bpf-next,v5,00/12] bpf: Support dumping kfunc prototypes from BTF

Message ID cover.1718207789.git.dxu@dxuuu.xyz
Headers show
Series bpf: Support dumping kfunc prototypes from BTF | expand

Message

Daniel Xu June 12, 2024, 3:58 p.m. UTC
This patchset enables both detecting as well as dumping compilable
prototypes for kfuncs.

The first commit instructs pahole to DECL_TAG kfuncs when available.
This requires v1.27 which was released on 6/11/24. With it, users will
be able to look at BTF inside vmlinux (or modules) and check if the
kfunc they want is available.

The final commit teaches bpftool how to dump kfunc prototypes. This
is done for developer convenience.

The rest of the commits are fixups to enable selftests to use the
newly dumped kfunc prototypes. With these, selftests will regularly
exercise the newly added codepaths.

Tested with and without the required pahole changes:

  * https://github.com/kernel-patches/bpf/pull/7186
  * https://github.com/kernel-patches/bpf/pull/7187

=== Changelog ===