mbox series

[bpf-next,v2,0/2] bpf: Show target_{obj,btf}_id for tracing link

Message ID 20230517103126.68372-1-laoar.shao@gmail.com (mailing list archive)
Headers show
Series bpf: Show target_{obj,btf}_id for tracing link | expand

Message

Yafang Shao May 17, 2023, 10:31 a.m. UTC
The target_btf_id can help us understand which kernel function is
linked by a tracing prog. The target_btf_id and target_obj_id have
already been exposed to userspace, so we just need to show them.

For some other link types like perf_event and kprobe_multi, it is not
easy to find which functions are attached either. We may support
->fill_link_info for them in the future.

v1->v2:
- Skip showing them in the plain output for the old kernels. (Quentin)
- Coding improvement. (Andrii)

Yafang Shao (2):
  bpf: Show target_{obj,btf}_id in tracing link fdinfo
  bpftool: Show target_{obj,btf}_id in tracing link info

 kernel/bpf/syscall.c     | 11 +++++++++--
 tools/bpf/bpftool/link.c |  6 ++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

Comments

Quentin Monnet May 17, 2023, 2:14 p.m. UTC | #1
2023-05-17 10:31 UTC+0000 ~ Yafang Shao <laoar.shao@gmail.com>
> The target_btf_id can help us understand which kernel function is
> linked by a tracing prog. The target_btf_id and target_obj_id have
> already been exposed to userspace, so we just need to show them.
> 
> For some other link types like perf_event and kprobe_multi, it is not
> easy to find which functions are attached either. We may support
> ->fill_link_info for them in the future.
> 
> v1->v2:
> - Skip showing them in the plain output for the old kernels. (Quentin)
> - Coding improvement. (Andrii)
> 
> Yafang Shao (2):
>   bpf: Show target_{obj,btf}_id in tracing link fdinfo
>   bpftool: Show target_{obj,btf}_id in tracing link info
> 
>  kernel/bpf/syscall.c     | 11 +++++++++--
>  tools/bpf/bpftool/link.c |  6 ++++++
>  2 files changed, 15 insertions(+), 2 deletions(-)
> 

Acked-by: Quentin Monnet <quentin@isovalent.com>

Thanks!
patchwork-bot+netdevbpf@kernel.org May 19, 2023, 5:10 p.m. UTC | #2
Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Wed, 17 May 2023 10:31:24 +0000 you wrote:
> The target_btf_id can help us understand which kernel function is
> linked by a tracing prog. The target_btf_id and target_obj_id have
> already been exposed to userspace, so we just need to show them.
> 
> For some other link types like perf_event and kprobe_multi, it is not
> easy to find which functions are attached either. We may support
> ->fill_link_info for them in the future.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v2,1/2] bpf: Show target_{obj,btf}_id in tracing link fdinfo
    https://git.kernel.org/bpf/bpf-next/c/e859e429511a
  - [bpf-next,v2,2/2] bpftool: Show target_{obj,btf}_id in tracing link info
    https://git.kernel.org/bpf/bpf-next/c/d7e45eb4802b

You are awesome, thank you!