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.
Showing the changes to tools/include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -6562,6 +6562,16 @@ struct bpf_link_info { · 6561 unmodified lines | ||
| 6562 | 6562 | __u32 flags; |
| 6563 | 6563 | __u64 missed; |
| 6564 | 6564 | } kprobe_multi; |
| 6565 | + struct { | |
| 6566 | + __aligned_u64 path; | |
| 6567 | + __aligned_u64 offsets; | |
| 6568 | + __aligned_u64 ref_ctr_offsets; | |
| 6569 | + __aligned_u64 cookies; | |
| 6570 | + __u32 path_size; /* in/out: real path size on success, including zero byte */ | |
| 6571 | + __u32 count; /* in/out: uprobe_multi offsets/ref_ctr_offsets/cookies count */ | |
| 6572 | + __u32 flags; | |
| 6573 | + __u32 pid; | |
| 6574 | + } uprobe_multi; | |
| 6565 | 6575 | struct { |
| 6566 | 6576 | __u32 type; /* enum bpf_perf_event_type */ |
| 6567 | 6577 | __u32 :32; |