netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 bpf 0/4] bpf: Fix cookie values for kprobe multi
@ 2022-06-15 11:21 Jiri Olsa
  2022-06-15 11:21 ` [PATCHv3 bpf 1/4] selftests/bpf: Shuffle cookies symbols in kprobe multi test Jiri Olsa
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jiri Olsa @ 2022-06-15 11:21 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: netdev, bpf, lkml, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Steven Rostedt, Masami Hiramatsu

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(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-17  2:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-15 11:21 [PATCHv3 bpf 0/4] bpf: Fix cookie values for kprobe multi Jiri Olsa
2022-06-15 11:21 ` [PATCHv3 bpf 1/4] selftests/bpf: Shuffle cookies symbols in kprobe multi test Jiri Olsa
2022-06-15 11:21 ` [PATCHv3 bpf 2/4] ftrace: Keep address offset in ftrace_lookup_symbols Jiri Olsa
2022-06-15 11:21 ` [PATCHv3 bpf 3/4] bpf: Force cookies array to follow symbols sorting Jiri Olsa
2022-06-15 11:21 ` [PATCHv3 bpf 4/4] selftest/bpf: Fix kprobe_multi bench test Jiri Olsa
2022-06-17  2:50 ` [PATCHv3 bpf 0/4] bpf: Fix cookie values for kprobe multi patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).