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(-) -- 2.44.0