Re: [PATCH v6 bpf-next 00/11] bpf: Support ->fill_link_info for kprobe_multi and perf_event links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 28, 2023 at 11:53:18AM +0000, Yafang Shao wrote:
> This patchset enhances the usability of kprobe_multi program 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.
> 
> v5->v6:
> - From Andrii
>   - if ucount is too less, copy ucount items and return -E2BIG 
>   - zero out kmulti_link->cnt elements if it is not permitted by kptr
>   - avoid leaking information when ucount is greater than kmulti_link->cnt
>   - drop the flags, and add BPF_PERF_EVENT_[UK]RETPROBE 
> - From Quentin
>   - use jsonw_null instead when we have no module name
>   - add explanation on perf_type_name in the commit log
>   - avoid the unnecessary out lable 

Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

jirka




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux