From: Oleg Nesterov <oleg@redhat.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Andrii Nakryiko <andrii@kernel.org>,
Tianyi Liu <i.pear@outlook.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
bpf@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCHv2 bpf-next 1/4] bpf: Fix uprobe multi pid filter check
Date: Thu, 5 Sep 2024 16:07:08 +0200 [thread overview]
Message-ID: <20240905140708.GA8336@redhat.com> (raw)
In-Reply-To: <20240905115124.1503998-2-jolsa@kernel.org>
On 09/05, Jiri Olsa wrote:
>
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -3207,7 +3207,7 @@ static int uprobe_prog_run(struct bpf_uprobe *uprobe,
> struct bpf_run_ctx *old_run_ctx;
> int err = 0;
>
> - if (link->task && current->mm != link->task->mm)
> + if (link->task && !same_thread_group(current, link->task))
> return 0;
plus the current check can return false negative if link->task->mm == NULL
Acked-by: Oleg Nesterov <oleg@redhat.com>
next prev parent reply other threads:[~2024-09-05 14:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 11:51 [PATCHv2 bpf-next 0/4] selftests/bpf: Add uprobe multi pid filter test Jiri Olsa
2024-09-05 11:51 ` [PATCHv2 bpf-next 1/4] bpf: Fix uprobe multi pid filter check Jiri Olsa
2024-09-05 14:07 ` Oleg Nesterov [this message]
2024-09-05 11:51 ` [PATCHv2 bpf-next 2/4] selftests/bpf: Add child argument to spawn_child function Jiri Olsa
2024-09-05 11:51 ` [PATCHv2 bpf-next 3/4] selftests/bpf: Add uprobe multi pid filter test for fork-ed processes Jiri Olsa
2024-09-05 11:51 ` [PATCHv2 bpf-next 4/4] selftests/bpf: Add uprobe multi pid filter test for clone-ed processes Jiri Olsa
2024-09-05 20:10 ` [PATCHv2 bpf-next 0/4] selftests/bpf: Add uprobe multi pid filter test patchwork-bot+netdevbpf
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=20240905140708.GA8336@redhat.com \
--to=oleg@redhat.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=i.pear@outlook.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/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).