lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aBS0xd6KqoWRpj7u@pavilion.home>
Date: Fri, 2 May 2025 14:04:21 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>, LKML <linux-kernel@...r.kernel.org>,
	"Liang, Kan" <kan.liang@...ux.intel.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ian Rogers <irogers@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Namhyung Kim <namhyung@...nel.org>,
	Ravi Bangoria <ravi.bangoria@....com>,
	linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 2/4] perf: Fix irq work dereferencing garbage

Le Fri, May 02, 2025 at 01:30:02PM +0200, Peter Zijlstra a écrit :
> On Fri, May 02, 2025 at 12:29:18PM +0200, Peter Zijlstra wrote:
> 
> > > @@ -13951,18 +13943,25 @@ perf_event_exit_event(struct perf_event *event,
> > >  	/*
> > >  	 * Child events can be freed.
> > >  	 */
> > > -	if (is_child) {
> > > -		if (parent_event) {
> > > -			mutex_unlock(&parent_event->child_mutex);
> > > -			/*
> > > -			 * Kick perf_poll() for is_event_hup();
> > > -			 */
> > > -			perf_event_wakeup(parent_event);
> > > +	if (parent_event) {
> > > +		mutex_unlock(&parent_event->child_mutex);
> > > +		/*
> > > +		 * Kick perf_poll() for is_event_hup();
> > > +		 */
> > > +		perf_event_wakeup(parent_event);
> > 
> > Should not this perf_event_wakeup() be inside the next if() as well?
> > doing anything on parent_event when !ATTACH_CHILD seems dodgy.
> 
> I made this change, and munged the original changelog on top and stuffed
> the patches into queue/perf/core.

Looks good, but it looks like you trimmed the changelog with the
race windows part. Though I must confess, who wants to read that anyway? ;-)

-- 
Frederic Weisbecker
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ