There is currently no way to discover the target of a tracing program attachment after the fact. Add this information to bpf_link_info and return it when querying the bpf_link fd.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -5416,6 +5416,8 @@ struct bpf_link_info { · 5415 unmodified lines | ||
| 5416 | 5416 | } raw_tracepoint; |
| 5417 | 5417 | struct { |
| 5418 | 5418 | __u32 attach_type; |
| 5419 | + __u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */ | |
| 5420 | + __u32 target_btf_id; /* BTF type id inside the object */ | |
| 5419 | 5421 | } tracing; |
| 5420 | 5422 | struct { |
| 5421 | 5423 | __u64 cgroup_id; |