On Thu, Jun 15, 2023 at 6:04 PM Jiri Olsa <olsajiri@xxxxxxxxx> wrote: > > On Mon, Jun 12, 2023 at 03:15:58PM +0000, Yafang Shao wrote: > > This patchset enhances the usability of kprobe_multi programs by introducing > > support for ->fill_link_info. This allows users to easily determine the > > probed functions associated with a kprobe_multi program. While > > `bpftool perf show` already provides information about functions probed by > > perf_event programs, supporting ->fill_link_info ensures consistent access to > > this information across all bpf links. > > > > In addition, this patch extends support to generic perf events, which are > > currently not covered by `bpftool perf show`. While userspace is exposed to > > only the perf type and config, other attributes such as sample_period and > > sample_freq are disregarded. > > > > To ensure accurate identification of probed functions, it is preferable to > > expose the address directly rather than relying solely on the symbol name. > > However, this implementation respects the kptr_restrict setting and avoids > > exposing the address if it is not permitted. > > > > v2->v3: > > - Expose flags instead of retporbe (Andrii) > > - Simplify the check on kmulti_link->cnt (Andrii) > > - Use kallsyms_show_value() instead (Andrii) > > - Show also the module name for kprobe_multi (Andrii) > > - Add new enum bpf_perf_link_type (Andrii) > > - Move perf event names into bpftool (Andrii, Quentin, Jiri) > > - Keep perf event names in sync with perf tools (Jiri) > > hi, > I'm getting some failing tests with this version: > > #11/2 bpf_cookie/multi_kprobe_link_api:FAIL > #11/3 bpf_cookie/multi_kprobe_attach_api:FAIL > #11 bpf_cookie:FAIL > > #104/1 kprobe_multi_test/skel_api:FAIL > #104/2 kprobe_multi_test/link_api_addrs:FAIL > #104/3 kprobe_multi_test/link_api_syms:FAIL > #104/4 kprobe_multi_test/attach_api_pattern:FAIL > #104/5 kprobe_multi_test/attach_api_addrs:FAIL > #104/6 kprobe_multi_test/attach_api_syms:FAIL > #104 kprobe_multi_test:FAIL > #105/1 kprobe_multi_testmod_test/testmod_attach_api_syms:FAIL > #105/2 kprobe_multi_testmod_test/testmod_attach_api_addrs:FAIL > #105 kprobe_multi_testmod_test:FAIL Thanks for your report. BPF CI catched these errors as well. That is caused by setting link->fp.flags, which has been pointed out by you in patch #1. I will fix it in the next version. -- Regards Yafang