]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: Add support for uprobe multi session attach
authorJiri Olsa <jolsa@kernel.org>
Fri, 8 Nov 2024 13:45:34 +0000 (14:45 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 11 Nov 2024 16:18:03 +0000 (08:18 -0800)
commitd920179b3d4842a0e27cae54fdddbe5ef3977e73
tree6eee3b05532462014b0fc7682325c3776facddbb
parentf505005bc7426f4309880da94cfbfc37efa225bd
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
include/uapi/linux/bpf.h
kernel/bpf/syscall.c
kernel/bpf/verifier.c
kernel/trace/bpf_trace.c
tools/include/uapi/linux/bpf.h
tools/lib/bpf/libbpf.c