diff options
author | Tyrone Wu <[email protected]> | 2024-10-08 16:43:11 +0000 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2024-10-09 18:17:16 -0700 |
commit | 4deecdd29cf29844c7bd164d72dc38d2e672f64e (patch) | |
tree | 7ce39a7641a75ded12da89b7d8275d3a0796c2f5 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 434247637c66e1be2bc71a9987d4c3f0d8672387 (diff) |
bpf: fix unpopulated name_len field in perf_event link info
Previously when retrieving `bpf_link_info.perf_event` for
kprobe/uprobe/tracepoint, the `name_len` field was not populated by the
kernel, leaving it to reflect the value initially set by the user. This
behavior was inconsistent with how other input/output string buffer
fields function (e.g. `raw_tracepoint.tp_name_len`).
This patch fills `name_len` with the actual size of the string name.
Fixes: 1b715e1b0ec5 ("bpf: Support ->fill_link_info for perf_event")
Signed-off-by: Tyrone Wu <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Acked-by: Yafang Shao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions