Skip to content

RFC bpf: Support ->show_fdinfo and ->fill_link_info for kprobe prog

Yafang Shao bpf oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8bpf: Support ->show_fdinfo for kprobe_multikernel/trace/bpf_trace.c+17 -04 replies
2/8bpf: Support ->fill_link_info for kprobe_multiinclude/uapi/linux/bpf.h kernel/trace/bpf_trace.c tools/include/uapi/linux/bpf.h+39 -03 replies
3/8bpftool: Show probed function in kprobe_multi link infotools/bpf/bpftool/link.c+50 -04 replies
4/8bpf: Always expose the probed addresskernel/trace/trace_kprobe.c+1 -10 replies
5/8bpf: Support ->show_fdinfo for perf_eventkernel/bpf/syscall.c+27 -00 replies
6/8bpf: Add a common helper bpf_copy_to_user()kernel/bpf/syscall.c+20 -140 replies
7/8bpf: Support ->fill_link_info for perf_eventinclude/uapi/linux/bpf.h kernel/bpf/syscall.c tools/include/uapi/linux/bpf.h+58 -02 replies
8/8bpftool: Show probed function in perf_event link infotools/bpf/bpftool/link.c+20 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH bpf-next 0/8] bpf: Support ->show_fdinfo and ->fill_link_info for kprobe prog

Currently, it is not easy to determine which functions are probed by a kprobe_multi program. This patchset supports ->show_fdinfo and ->fill_link_info for it, allowing the user to easily obtain the probed functions.

Although the user can retrieve the functions probed by a perf_event program using bpftool perf show, it would be beneficial to also support ->show_fdinfo and ->fill_link_info. This way, the user can obtain it in the same manner as other bpf links.

It would be preferable to expose the address directly rather than the symbol name, as multiple functions may share the same name.

Yafang Shao (8):
bpf: Support ->show_fdinfo for kprobe_multi
bpf: Support ->fill_link_info for kprobe_multi
bpftool: Show probed function in kprobe_multi link info
bpf: Always expose the probed address
bpf: Support ->show_fdinfo for perf_event
bpf: Add a common helper bpf_copy_to_user()
bpf: Support ->fill_link_info for perf_event
bpftool: Show probed function in perf_event link info

 include/uapi/linux/bpf.h       |  10 ++++
 kernel/bpf/syscall.c           | 107 +++++++++++++++++++++++++++++++++++------
 kernel/trace/bpf_trace.c       |  48 ++++++++++++++++++
 kernel/trace/trace_kprobe.c    |   2 +-
 tools/bpf/bpftool/link.c       |  71 ++++++++++++++++++++++++++-
 tools/include/uapi/linux/bpf.h |  10 ++++
 6 files changed, 232 insertions(+), 16 deletions(-)
Signature · 1 line
1.8.3.1