-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpf: Add link_info support for uprobe multi link #5957
Conversation
Upstream branch: b4e59c1 |
3854990
to
dac6775
Compare
Upstream branch: 0ca98fc |
a411898
to
6831f61
Compare
dac6775
to
511f94e
Compare
Upstream branch: 3815f89 |
6831f61
to
30a0ec8
Compare
511f94e
to
9d1eebb
Compare
Upstream branch: 6f101db |
30a0ec8
to
2ddc4f2
Compare
9d1eebb
to
b4661bc
Compare
Upstream branch: e80742d |
2ddc4f2
to
43ef3c5
Compare
b4661bc
to
77f4da6
Compare
Upstream branch: 155addf |
43ef3c5
to
452580f
Compare
77f4da6
to
8733869
Compare
Upstream branch: 155addf |
452580f
to
4f6e28b
Compare
8733869
to
94d3865
Compare
Upstream branch: 689b097 |
4f6e28b
to
2396659
Compare
94d3865
to
91eb9b4
Compare
We need to get offsets for static variables in following changes, so making elf_resolve_syms_offsets to take st_type value as argument and passing it to elf_sym_iter_new. Acked-by: Song Liu <song@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org>
We will need to return ref_ctr_offsets values through link_info interface in following change, so we need to keep them around. Storing ref_ctr_offsets values directly into bpf_uprobe array. Acked-by: Song Liu <song@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org>
Adding support to get uprobe_link details through bpf_link_info interface. Adding new struct uprobe_multi to struct bpf_link_info to carry the uprobe_multi link details. The uprobe_multi.count is passed from user space to denote size of array fields (offsets/ref_ctr_offsets/cookies). The actual array size is stored back to uprobe_multi.count (allowing user to find out the actual array size) and array fields are populated up to the user passed size. All the non-array fields (path/count/flags/pid) are always set. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
The fill_link_info test keeps skeleton open and just creates various links. We are wrongly calling bpf_link__detach after each test to close them, we need to call bpf_link__destroy. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Yafang Shao <laoar.shao@gmail.com>
Adding fill_link_info test for uprobe_multi link. Setting up uprobes with bogus ref_ctr_offsets and cookie values to test all the bpf_link_info::uprobe_multi fields. Acked-by: Song Liu <song@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding support to display details for uprobe_multi links, both plain: # bpftool link -p ... 24: uprobe_multi prog 126 uprobe.multi path /home/jolsa/bpf/test_progs func_cnt 3 pid 4143 offset ref_ctr_offset cookies 0xd1f88 0xf5d5a8 0xdead 0xd1f8f 0xf5d5aa 0xbeef 0xd1f96 0xf5d5ac 0xcafe and json: # bpftool link -p [{ ... },{ "id": 24, "type": "uprobe_multi", "prog_id": 126, "retprobe": false, "path": "/home/jolsa/bpf/test_progs", "func_cnt": 3, "pid": 4143, "funcs": [{ "offset": 860040, "ref_ctr_offset": 16111016, "cookie": 57005 },{ "offset": 860047, "ref_ctr_offset": 16111018, "cookie": 48879 },{ "offset": 860054, "ref_ctr_offset": 16111020, "cookie": 51966 } ] } ] Acked-by: Song Liu <song@kernel.org> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Upstream branch: 9241176 |
2396659
to
e952205
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=799882 expired. Closing PR. |
Pull request for series with
subject: bpf: Add link_info support for uprobe multi link
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=799882