Skip to content

bpf: Add cookies retrieval for perf/kprobe multi links

Jiri Olsa bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 10 repliesApplied 8/8
  2. v18 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- added review/ack tags
- fixed memory leak [Quentin]
- align the uapi fields properly [Yafang Shao]

[1] https://lore.kernel.org/bpf/CALOAHbAZ6=A9j3VFCLoAC_WhgQKU7injMf06=cM2sU4Hi4Sx+Q@mail.gmail.com/
---
Jiri Olsa (8):
bpf: Add cookie to perf_event bpf_link_info records
bpf: Store cookies in kprobe_multi bpf_link_info data
bpftool: Fix wrong free call in do_show_link
selftests/bpf: Add cookies check for kprobe_multi fill_link_info test selftests/bpf: Add cookies check for perf_event fill_link_info test selftests/bpf: Add fill_link_info test for perf event
bpftool: Display cookie for perf event link probes
bpftool: Display cookie for kprobe multi link

Patches in v2 All 8 applied

#Subject and filesSizeRepliesApplied
1/8bpf: Add cookie to perf_event bpf_link_info recordsinclude/uapi/linux/bpf.h kernel/bpf/syscall.c tools/include/uapi/linux/bpf.h+16 -02 repliesApplied
2/8bpf: Store cookies in kprobe_multi bpf_link_info datainclude/uapi/linux/bpf.h kernel/trace/bpf_trace.c tools/include/uapi/linux/bpf.h+17 -01 replyApplied
3/8bpftool: Fix wrong free call in do_show_linktools/bpf/bpftool/link.c+1 -11 replyApplied
4/8selftests/bpf: Add cookies check for kprobe_multi fill_link_info testtools/testing/selftests/bpf/prog_tests/fill_link_info.c+36 -121 replyApplied
5/8selftests/bpf: Add cookies check for perf_event fill_link_info testtools/testing/selftests/bpf/prog_tests/fill_link_info.c+21 -51 replyApplied
6/8selftests/bpf: Add fill_link_info test for perf eventtools/testing/selftests/bpf/prog_tests/fill_link_info.c tools/testing/selftests/bpf/progs/test_fill_link_info.c+46 -01 replyApplied
7/8bpftool: Display cookie for perf event link probestools/bpf/bpftool/link.c+14 -01 replyApplied
8/8bpftool: Display cookie for kprobe multi linktools/bpf/bpftool/link.c+63 -151 replyApplied

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchYafang ShaoQuentin MonnetSong Liu
SeriesR-b
1/8A-b A-b
2/8A-b A-b
3/8A-b R-b A-b
4/8A-b
5/8A-b
6/8A-b
7/8R-b A-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCHv2 bpf-next 0/8] bpf: Add cookies retrieval for perf/kprobe multi links

hi,
this patchset adds support to retrieve cookies from existing tracing links that still did not support it plus changes to bpftool to display them. It's leftover we discussed some time ago [1].

thanks,
jirka

v2 changes:
- added review/ack tags
- fixed memory leak [Quentin]
- align the uapi fields properly [Yafang Shao]

[1] https://lore.kernel.org/bpf/CALOAHbAZ6=A9j3VFCLoAC_WhgQKU7injMf06=cM2sU4Hi4Sx+Q@mail.gmail.com/
---
Jiri Olsa (8):
bpf: Add cookie to perf_event bpf_link_info records
bpf: Store cookies in kprobe_multi bpf_link_info data
bpftool: Fix wrong free call in do_show_link
selftests/bpf: Add cookies check for kprobe_multi fill_link_info test selftests/bpf: Add cookies check for perf_event fill_link_info test selftests/bpf: Add fill_link_info test for perf event
bpftool: Display cookie for perf event link probes
bpftool: Display cookie for kprobe multi link

 include/uapi/linux/bpf.h                                |   7 ++++++
 kernel/bpf/syscall.c                                    |   4 ++++
 kernel/trace/bpf_trace.c                                |  15 +++++++++++++
 tools/bpf/bpftool/link.c                                |  94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
 tools/include/uapi/linux/bpf.h                          |   7 ++++++
 tools/testing/selftests/bpf/prog_tests/fill_link_info.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
 tools/testing/selftests/bpf/progs/test_fill_link_info.c |   6 +++++
 7 files changed, 214 insertions(+), 33 deletions(-)