mbox series

[bpf-next,v3,0/2] bpf: bpftool: Support dumping kfunc prototypes from BTF

Message ID cover.1715625447.git.dxu@dxuuu.xyz (mailing list archive)
Headers show
Series bpf: bpftool: Support dumping kfunc prototypes from BTF | expand

Message

Daniel Xu May 13, 2024, 6:38 p.m. UTC
This patchset enables both detecting as well as dumping compilable
prototypes for kfuncs.

Users will be able to look at BTF inside vmlinux (or modules) and check
if the kfunc they want is available.

For developer convenience, we also support dumping kfunc prototypes from
bpftool.

=== Changelog ===
From v2:
* Update Makefile.btf with pahole flag
* More error checking
* Output formatting changes
* Drop already-merged commit

From v1:
* Add __weak annotation
* Use btf_dump for kfunc prototypes
* Update kernel bpf_rdonly_cast() signature

Daniel Xu (2):
  kbuild: bpf: Tell pahole to DECL_TAG kfuncs
  bpftool: Support dumping kfunc prototypes from BTF

 scripts/Makefile.btf    |  2 +-
 tools/bpf/bpftool/btf.c | 54 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)