summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@redhat.com>2021-04-13 11:16:06 +0200
committerAlexei Starovoitov <ast@kernel.org>2021-04-13 18:18:57 -0700
commit441e8c66b23e027c00ccebd70df9fd933918eefe (patch)
treea63bbd06a0039e18a5a8f2c972c16e9d47e46f2b /tools/include
parentdb16c1fe92d7ba7d39061faef897842baee2c887 (diff)
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. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210413091607.58945-1-toke@redhat.com
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/uapi/linux/bpf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 85c924bc21b1..df164a44bb41 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -5416,6 +5416,8 @@ struct bpf_link_info {
} raw_tracepoint;
struct {
__u32 attach_type;
+ __u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */
+ __u32 target_btf_id; /* BTF type id inside the object */
} tracing;
struct {
__u64 cgroup_id;