BPF List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: Pu Lehui <pulehui@huaweicloud.com>,
	bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
	Jann Horn <jannh@google.com>, Pu Lehui <pulehui@huawei.com>
Subject: Re: [PATCH bpf-next v2] bpf: Move out synchronize_rcu_tasks_trace from mutex CS
Date: Wed, 8 Jan 2025 13:50:48 +0100	[thread overview]
Message-ID: <20250108125048.GG23315@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <Z35gz9q8z7LBNssS@krava>

On Wed, Jan 08, 2025 at 12:26:07PM +0100, Jiri Olsa wrote:
> On Sat, Jan 04, 2025 at 01:39:46AM +0000, Pu Lehui wrote:
> > From: Pu Lehui <pulehui@huawei.com>
> > 
> > Commit ef1b808e3b7c ("bpf: Fix UAF via mismatching bpf_prog/attachment
> > RCU flavors") resolved a possible UAF issue in uprobes that attach
> > non-sleepable bpf prog by explicitly waiting for a tasks-trace-RCU grace
> > period. But, in the current implementation, synchronize_rcu_tasks_trace
> > is included within the mutex critical section, which increases the
> > length of the critical section and may affect performance. So let's move
> > out synchronize_rcu_tasks_trace from mutex CS.
> 
> lgtm, adding peter

Yeah, I don't immediately see anything funny there either. Carry on.

  reply	other threads:[~2025-01-08 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-04  1:39 [PATCH bpf-next v2] bpf: Move out synchronize_rcu_tasks_trace from mutex CS Pu Lehui
2025-01-08 11:26 ` Jiri Olsa
2025-01-08 12:50   ` Peter Zijlstra [this message]
2025-01-08 17:50 ` 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=20250108125048.GG23315@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=jannh@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=olsajiri@gmail.com \
    --cc=pulehui@huawei.com \
    --cc=pulehui@huaweicloud.com \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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