Skip to content

bpf: Fix cookie values for kprobe multi

Jiri Olsa bpf lkml netdev 3 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesApplied 4/4
  2. v23 patches 11 repliesSuperseded
  3. v13 patches 16 repliesSuperseded

Changes in v3 from the cover letter

- fixed kprobe_multi bench test to filter out invalid entries from available_filter_functions

Patches in v3 All 4 applied

#Subject and filesSizeRepliesApplied
1/4selftests/bpf: Shuffle cookies symbols in kprobe multi testtools/testing/selftests/bpf/prog_tests/bpf_cookie.c tools/testing/selftests/bpf/progs/kprobe_multi.c+51 -510 repliesApplied
2/4ftrace: Keep address offset in ftrace_lookup_symbolskernel/trace/ftrace.c+11 -20 repliesApplied
3/4bpf: Force cookies array to follow symbols sortingkernel/trace/bpf_trace.c+45 -150 repliesApplied
4/4selftest/bpf: Fix kprobe_multi bench testtools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c+3 -00 repliesApplied

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchSong LiuSteven Rostedt (Google)
1/4A-b
2/4A-b A-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHv3 bpf 0/4] bpf: Fix cookie values for kprobe multi

hi,
there's bug in kprobe_multi link that makes cookies misplaced when using symbols to attach. The reason is that we sort symbols by name but not adjacent cookie values. Current test did not find it because bpf_fentry_test* are already sorted by name.

v3 changes:
- fixed kprobe_multi bench test to filter out invalid entries from available_filter_functions

v2 changes:
- rebased on top of bpf/master
- checking if cookies are defined later in swap function [Andrii]
- added acks

thanks,
jirka

---
Jiri Olsa (4):
selftests/bpf: Shuffle cookies symbols in kprobe multi test
ftrace: Keep address offset in ftrace_lookup_symbols
bpf: Force cookies array to follow symbols sorting selftest/bpf: Fix kprobe_multi bench test

 kernel/trace/bpf_trace.c                                   | 60 +++++++++++++++++++++++++++++++++++++++++++++---------------
 kernel/trace/ftrace.c                                      | 13 +++++++++++--
 tools/testing/selftests/bpf/prog_tests/bpf_cookie.c        | 78 +++++++++++++++++++++++++++++++++++++++---------------------------------------
 tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c |  3 +++
 tools/testing/selftests/bpf/progs/kprobe_multi.c           | 24 ++++++++++++------------
 5 files changed, 110 insertions(+), 68 deletions(-)