mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-26 11:19:06 +08:00
libbpf: Add generic bpf_program__attach()
Generalize BPF program attaching and allow libbpf to auto-detect type (and extra parameters, where applicable) and attach supported BPF program types based on program sections. Currently this is supported for: - kprobe/kretprobe; - tracepoint; - raw tracepoint; - tracing programs (typed raw TP/fentry/fexit). More types support can be trivially added within this framework. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20191214014341.3442258-3-andriin@fb.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
4f3c7b3e13
commit
f7af143516
@@ -210,4 +210,6 @@ LIBBPF_0.0.6 {
|
||||
} LIBBPF_0.0.5;
|
||||
|
||||
LIBBPF_0.0.7 {
|
||||
global:
|
||||
bpf_program__attach;
|
||||
} LIBBPF_0.0.6;
|
||||
|
||||
Reference in New Issue
Block a user