From: Song Liu <songliubraving@fb.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>, Martin Lau <kafai@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: Re: [PATCH bpf-next 3/3] bpf: Force cookies array to follow symbols sorting
Date: Mon, 30 May 2022 05:40:11 +0000 [thread overview]
Message-ID: <A562FD5D-AB25-4659-B5C6-A403374AECD0@fb.com> (raw)
In-Reply-To: <20220527205611.655282-4-jolsa@kernel.org>
> On May 27, 2022, at 1:56 PM, Jiri Olsa <jolsa@kernel.org> wrote:
>
> When user specifies symbols and cookies for kprobe_multi link
> interface it's very likely the cookies will be misplaced and
> returned to wrong functions (via get_attach_cookie helper).
>
> The reason is that to resolve the provided functions we sort
> them before passing them to ftrace_lookup_symbols, but we do
> not do the same sort on the cookie values.
>
> Fixing this by using sort_r function with custom swap callback
> that swaps cookie values as well.
>
> Fixes: 0236fec57a15 ("bpf: Resolve symbols with ftrace_lookup_symbols for kprobe multi link")
> Signed-off-by: Jiri Olsa <jolsa@kernel.org
Acked-by: Song Liu <songliubraving@fb.com>
next prev parent reply other threads:[~2022-05-30 5:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 20:56 [PATCH bpf-next 0/3] bpf: Fix cookie values for kprobe multi Jiri Olsa
2022-05-27 20:56 ` [PATCH bpf-next 1/3] selftests/bpf: Shuffle cookies symbols in kprobe multi test Jiri Olsa
2022-05-30 5:37 ` Song Liu
2022-05-27 20:56 ` [PATCH bpf-next 2/3] ftrace: Keep address offset in ftrace_lookup_symbols Jiri Olsa
2022-05-30 5:37 ` Song Liu
2022-05-30 7:31 ` Jiri Olsa
2022-05-30 20:20 ` Daniel Borkmann
2022-06-05 16:55 ` Steven Rostedt
2022-06-02 22:52 ` Andrii Nakryiko
2022-06-03 10:16 ` Jiri Olsa
2022-06-03 19:12 ` Andrii Nakryiko
2022-06-05 16:51 ` Steven Rostedt
2022-06-06 17:56 ` Jiri Olsa
2022-05-27 20:56 ` [PATCH bpf-next 3/3] bpf: Force cookies array to follow symbols sorting Jiri Olsa
2022-05-30 5:40 ` Song Liu [this message]
2022-06-02 23:01 ` Andrii Nakryiko
2022-06-02 23:02 ` Andrii Nakryiko
2022-06-03 10:23 ` Jiri Olsa
2022-06-03 21:56 ` Andrii Nakryiko
2022-06-03 10:18 ` 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=A562FD5D-AB25-4659-B5C6-A403374AECD0@fb.com \
--to=songliubraving@fb.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--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=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
all inboxes | Powered by JetHome®