-
Notifications
You must be signed in to change notification settings - Fork 101
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 #5885
Conversation
Upstream branch: 22360fa |
04be66b
to
3d13a17
Compare
Upstream branch: c421c12 |
9704878
to
ef71c01
Compare
3d13a17
to
3112c68
Compare
Upstream branch: 37db10b |
ef71c01
to
817c9dd
Compare
3112c68
to
594f71b
Compare
Upstream branch: f17a62f |
817c9dd
to
81e415d
Compare
594f71b
to
19e160d
Compare
Upstream branch: 399f618 |
81e415d
to
cb4950e
Compare
19e160d
to
bf1bad6
Compare
Upstream branch: 3de07b9 |
cb4950e
to
0ec9906
Compare
bf1bad6
to
7e8e6bc
Compare
Upstream branch: ea41b88 |
0ec9906
to
7687e35
Compare
7e8e6bc
to
d77e690
Compare
Upstream branch: ea41b88 |
7687e35
to
3c11792
Compare
d77e690
to
a4a0c99
Compare
Upstream branch: ea41b88 |
3c11792
to
f96a3f6
Compare
b72c01e
to
4353cf4
Compare
Upstream branch: 6808918 |
9340332
to
72d43ec
Compare
4353cf4
to
60df9b2
Compare
Upstream branch: 6808918 |
72d43ec
to
2cd72e6
Compare
60df9b2
to
1404ebd
Compare
Upstream branch: 6808918 |
2cd72e6
to
738d89b
Compare
1404ebd
to
145668c
Compare
Upstream branch: f1c7339 |
738d89b
to
edf547f
Compare
145668c
to
61441b0
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. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Song Liu <song@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. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Song Liu <song@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. Also we need to set the link NULL so the skeleton destroy won't try to destroy them again. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Yafang Shao <laoar.shao@gmail.com> Acked-by: Song Liu <song@kernel.org>
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. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Song Liu <song@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 | jq [{ ... },{ "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 } ] } ] Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Song Liu <song@kernel.org> Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Upstream branch: f2fbb90 |
edf547f
to
1fa5198
Compare
61441b0
to
4524ac0
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=796571 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=796571