summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf_version.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-03-04 17:01:28 -0800
committerAlexei Starovoitov <ast@kernel.org>2022-03-05 09:38:15 -0800
commit697f104db8a6177daa5e1ffadda09c2e9285ad18 (patch)
treec6ca7380a14c8aa30b03fe8b64c7967f64b82877 /tools/lib/bpf/libbpf_version.h
parent4fa5bcfe07f7e97d9a140c465e1056c91651c41d (diff)
downloadlinux-697f104db8a6177daa5e1ffadda09c2e9285ad18.tar.gz
linux-697f104db8a6177daa5e1ffadda09c2e9285ad18.tar.bz2
linux-697f104db8a6177daa5e1ffadda09c2e9285ad18.zip
libbpf: Support custom SEC() handlers
Allow registering and unregistering custom handlers for BPF program. This allows user applications and libraries to plug into libbpf's declarative SEC() definition handling logic. This allows to offload complex and intricate custom logic into external libraries, but still provide a great user experience. One such example is USDT handling library, which has a lot of code and complexity which doesn't make sense to put into libbpf directly, but it would be really great for users to be able to specify BPF programs with something like SEC("usdt/<path-to-binary>:<usdt_provider>:<usdt_name>") and have correct BPF program type set (BPF_PROGRAM_TYPE_KPROBE, as it is uprobe) and even support BPF skeleton's auto-attach logic. In some cases, it might be even good idea to override libbpf's default handling, like for SEC("perf_event") programs. With custom library, it's possible to extend logic to support specifying perf event specification right there in SEC() definition without burdening libbpf with lots of custom logic or extra library dependecies (e.g., libpfm4). With current patch it's possible to override libbpf's SEC("perf_event") handling and specify a completely custom ones. Further, it's possible to specify a generic fallback handling for any SEC() that doesn't match any other custom or standard libbpf handlers. This allows to accommodate whatever legacy use cases there might be, if necessary. See doc comments for libbpf_register_prog_handler() and libbpf_unregister_prog_handler() for detailed semantics. This patch also bumps libbpf development version to v0.8 and adds new APIs there. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Tested-by: Alan Maguire <alan.maguire@oracle.com> Reviewed-by: Alan Maguire <alan.maguire@oracle.com> Link: https://lore.kernel.org/bpf/20220305010129.1549719-3-andrii@kernel.org
Diffstat (limited to 'tools/lib/bpf/libbpf_version.h')
-rw-r--r--tools/lib/bpf/libbpf_version.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf_version.h b/tools/lib/bpf/libbpf_version.h
index 0fefefc3500b..61f2039404b6 100644
--- a/tools/lib/bpf/libbpf_version.h
+++ b/tools/lib/bpf/libbpf_version.h
@@ -4,6 +4,6 @@
#define __LIBBPF_VERSION_H
#define LIBBPF_MAJOR_VERSION 0
-#define LIBBPF_MINOR_VERSION 7
+#define LIBBPF_MINOR_VERSION 8
#endif /* __LIBBPF_VERSION_H */