History

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).

Jiri Olsa committed 3 years ago

Commit b733eea1 parent 0b779b64 files · +36 −1Browse files

Showing the changes to tools/include/uapi/linux (1 of 4 files). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+1−0
@@ -1642,6 +1642,7 @@ union bpf_attr { · 1641 unmodified lines
1642 __aligned_u64 cookies;1642 __aligned_u64 cookies;
1643 __u32 cnt;1643 __u32 cnt;
1644 __u32 flags;1644 __u32 flags;
1645 __u32 pid;
1645 } uprobe_multi;1646 } uprobe_multi;
1646 };1647 };
1647 } link_create;1648 } link_create;