public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Qing Wang <wangqing7171@gmail.com>
To: zeri@umich.edu
Cc: acme@kernel.org, henryzhangjcle@gmail.com,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	mingo@redhat.com, peterz@infradead.org,
	syzbot+2a077cb788749964cf68@syzkaller.appspotmail.com,
	syzkaller-bugs@googlegroups.com, wangqing7171@gmail.com
Subject: Re: [PATCH] perf: Fix data race in perf_event_set_bpf_handler()
Date: Fri, 30 Jan 2026 11:34:20 +0800	[thread overview]
Message-ID: <20260130033420.23612-1-wangqing7171@gmail.com> (raw)
In-Reply-To: <CACkPEmne--T_3bdwJEy8-GEYm4EJF60xSoqbrQ-m_LuZhJhCuQ@mail.gmail.com>

On Wed, 28 Jan 2026 at 05:29, Henry Zhang <zeri@umich.edu> wrote:
> Thanks, this looks good.

I thought my patch is incorrect after review.

1. The RCU protects 'prog->aux' but not 'prog', so 'rcu_dereference(event->prog)'
is incorrect.
2. The UAF issue of 'prog' may not exist. It's needed further anlysis.

Let's forget my patch.

The data race is correctly fixed by your patch but there is still a little
suggestion:

The 'event->prog = NULL' in perf_event_free_bpf_handler is needed WRITE_ONCE.

--
Best regards,
Qing

  parent reply	other threads:[~2026-01-30  3:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27  2:36 [PATCH] perf: Fix data race in perf_event_set_bpf_handler() Henry Zhang
2026-01-27  8:37 ` Qing Wang
2026-01-30 10:07   ` Peter Zijlstra
2026-02-24 12:29     ` Peter Zijlstra
2026-01-27 10:36 ` Qing Wang
2026-01-27 21:29   ` Henry Zhang
2026-01-28  2:48     ` Qing Wang
2026-01-30  3:34     ` Qing Wang [this message]
2026-01-30 10:23 ` Peter Zijlstra
2026-01-30 13:48   ` Henry Zhang
2026-01-30 20:32   ` Andrii Nakryiko

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=20260130033420.23612-1-wangqing7171@gmail.com \
    --to=wangqing7171@gmail.com \
    --cc=acme@kernel.org \
    --cc=henryzhangjcle@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=syzbot+2a077cb788749964cf68@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=zeri@umich.edu \
    /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