summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2024-11-08 14:45:34 +0100
committerAndrii Nakryiko <andrii@kernel.org>2024-11-11 08:18:03 -0800
commitd920179b3d4842a0e27cae54fdddbe5ef3977e73 (patch)
tree6eee3b05532462014b0fc7682325c3776facddbb /tools/include
parentf505005bc7426f4309880da94cfbfc37efa225bd (diff)
bpf: Add support for uprobe multi session attach
Adding support to attach BPF program for entry and return probe of the same function. This is common use case which at the moment requires to create two uprobe multi links. Adding new BPF_TRACE_UPROBE_SESSION attach type that instructs kernel to attach single link program to both entry and exit probe. It's possible to control execution of the BPF program on return probe simply by returning zero or non zero from the entry BPF program execution to execute or not the BPF program on return probe respectively. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241108134544.480660-4-jolsa@kernel.org
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/uapi/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index f28b6527e815..4162afc6b5d0 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1116,6 +1116,7 @@ enum bpf_attach_type {
BPF_NETKIT_PRIMARY,
BPF_NETKIT_PEER,
BPF_TRACE_KPROBE_SESSION,
+ BPF_TRACE_UPROBE_SESSION,
__MAX_BPF_ATTACH_TYPE
};