History

bpf: Return target info when a tracing bpf_link is queried

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.

Toke Høiland-Jørgensen committed 5 years ago

Commit 441e8c61 parent db16c1f4 files · +16 −0Browse files

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

Unified · Split

include/uapi/linux/bpf.h+2−0
@@ -5416,6 +5416,8 @@ struct bpf_link_info { · 5415 unmodified lines
54165416 } raw_tracepoint;
54175417 struct {
54185418 __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 */
54195421 } tracing;
54205422 struct {
54215423 __u64 cgroup_id;