History

bpf: Add link_info support for uprobe multi link

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.

Jiri Olsa committed 2 years ago

Commit e56fdbf1 parent 4930b7f3 files · +92 −0Browse files

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

Unified · Split

tools/include/uapi/linux/bpf.h+10−0
@@ -6562,6 +6562,16 @@ struct bpf_link_info { · 6561 unmodified lines
65626562 __u32 flags;
65636563 __u64 missed;
65646564 } 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;
65656575 struct {
65666576 __u32 type; /* enum bpf_perf_event_type */
65676577 __u32 :32;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t