bpf: Return target info when a tracing bpf_link is queried
authorToke Høiland-Jørgensen <toke@redhat.com>
Tue, 13 Apr 2021 09:16:06 +0000 (11:16 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 14 Apr 2021 01:18:57 +0000 (18:18 -0700)
commit441e8c66b23e027c00ccebd70df9fd933918eefe
treea63bbd06a0039e18a5a8f2c972c16e9d47e46f2b
parentdb16c1fe92d7ba7d39061faef897842baee2c887
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
include/linux/bpf_verifier.h
include/uapi/linux/bpf.h
kernel/bpf/syscall.c
tools/include/uapi/linux/bpf.h