From: Jiri Olsa <jolsa@kernel.org>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
lkml <linux-kernel@vger.kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: [PATCHv2 bpf 0/3] bpf: Fix cookie values for kprobe multi
Date: Mon, 6 Jun 2022 20:47:28 +0200 [thread overview]
Message-ID: <20220606184731.437300-1-jolsa@kernel.org> (raw)
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.
v2 changes:
- rebased on top of bpf/master
- checking if cookies are defined later in swap function [Andrii]
- added acks
thanks,
jirka
---
Jiri Olsa (3):
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
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/progs/kprobe_multi.c | 24 ++++++++++++------------
4 files changed, 107 insertions(+), 68 deletions(-)
next reply other threads:[~2022-06-06 18:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 18:47 Jiri Olsa [this message]
2022-06-06 18:47 ` [PATCHv2 bpf 1/3] selftests/bpf: Shuffle cookies symbols in kprobe multi test Jiri Olsa
2022-06-06 18:47 ` [PATCHv2 bpf 2/3] ftrace: Keep address offset in ftrace_lookup_symbols Jiri Olsa
2022-06-06 18:47 ` [PATCHv2 bpf 3/3] bpf: Force cookies array to follow symbols sorting Jiri Olsa
2022-06-07 18:40 ` Alexei Starovoitov
2022-06-07 19:55 ` Jiri Olsa
2022-06-08 4:10 ` Alexei Starovoitov
2022-06-08 7:59 ` Jiri Olsa
2022-06-08 9:57 ` Jiri Olsa
2022-06-08 12:40 ` Steven Rostedt
2022-06-08 15:33 ` Jiri Olsa
2022-06-08 15:59 ` Andrii Nakryiko
2022-06-08 16:08 ` Steven Rostedt
2022-06-09 18:32 ` Andrii Nakryiko
2022-06-14 19:21 ` Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220606184731.437300-1-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).