Re: bpf_link_info: perf_event link info name_len field returning zero

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

 



On Sun, Sep 22, 2024 at 12:59 PM Tyrone Wu <wudevelops@xxxxxxxxx> wrote:
>
> Hello,
>
> When retrieving bpf_link_info.perf_event kprobe/uprobe/tracepoint
> data, I noticed that the name_len field always returns 0. After some
> digging, I see that name_len is never actually populated, which
> explains the 0 value.
>
> I expected it to function similarly to
> bpf_link_info.raw_tracepoint.tp_name_len, where that field is filled
> with the length of tp_name. However, I noticed that the selftest
> explicitly asserts that name_len should be 0. I was wondering if
> someone could clarify whether it is intended for the
> bpf_link_info.perf_event name_len field to not be populated.

This sounds like a bug. It should behave consistently with the other
users of input/output string buffer size fields: on input we get
maximum buffer size, on output we should put an actual size of the
string (especially if it was truncated).

Yafang, Jiri, WDYT?

>
> I apologize if this is not the appropriate place to ask this question.
> Thank you for your time!
>





[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