bpf: Support ->fill_link_info for kprobe_multi
authorYafang Shao <laoar.shao@gmail.com>
Sun, 9 Jul 2023 02:56:21 +0000 (02:56 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 12 Jul 2023 03:07:50 +0000 (20:07 -0700)
commit7ac8d0d2619256cc13eaf4a889b3177a1607b02d
tree5032900e7b4dc6f912fc3edab839484a746eb89e
parent07018b57066e0009c0b9945723f30e532d347ed3
bpf: Support ->fill_link_info for kprobe_multi

With the addition of support for fill_link_info to the kprobe_multi link,
users will gain the ability to inspect it conveniently using the
`bpftool link show`. This enhancement provides valuable information to the
user, including the count of probed functions and their respective
addresses. It's important to note that if the kptr_restrict setting is not
permitted, the probed address will not be exposed, ensuring security.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230709025630.3735-2-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/uapi/linux/bpf.h
kernel/trace/bpf_trace.c
tools/include/uapi/linux/bpf.h