diff options
author | Jiri Olsa <jolsa@kernel.org> | 2023-08-09 10:34:17 +0200 |
---|---|---|
committer | Quentin Monnet <qmonnet+github@qoba.lt> | 2023-08-29 12:34:13 +0100 |
commit | 6845c5a4162da2978ebfa70b50522f962491cb17 (patch) | |
tree | c02b1bb1e2f2b9fb88a6c2713b184dd74a930004 | |
parent | 85555311cc0c886a53b6776453fee033d47fb071 (diff) | |
download | bpftool-6845c5a4162da2978ebfa70b50522f962491cb17.tar.gz |
bpf: Add pid filter support for uprobe_multi link
Adding support to specify pid for uprobe_multi link and the uprobes
are created only for task with given pid value.
Using the consumer.filter filter callback for that, so the task gets
filtered during the uprobe installation.
We still need to check the task during runtime in the uprobe handler,
because the handler could get executed if there's another system
wide consumer on the same uprobe (thanks Oleg for the insight).
Cc: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230809083440.3209381-6-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r-- | include/uapi/linux/bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index d7f4f50..8790b39 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -1642,6 +1642,7 @@ union bpf_attr { __aligned_u64 cookies; __u32 cnt; __u32 flags; + __u32 pid; } uprobe_multi; }; } link_create; |