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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140219193724.GA27267@dreric01-Precision-T1600>
Date:	Wed, 19 Feb 2014 11:37:34 -0800
From:	Drew Richardson <drew.richardson@....com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Will Deacon <Will.Deacon@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Arnaldo <acme@...hat.com>, Pawel Moll <Pawel.Moll@....com>,
	Wade Cherry <Wade.Cherry@....com>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: Perf Oops on 3.14-rc2

On Wed, Feb 19, 2014 at 04:28:19PM +0000, Peter Zijlstra wrote:
> On Tue, Feb 18, 2014 at 10:18:31AM +0000, Will Deacon wrote:
> > On Mon, Feb 10, 2014 at 10:17:59PM +0000, Drew Richardson wrote:
> > > While adding CPU on/offlining support during perf captures I get an
> > > Oops both on ARM as well as my desktop x86_64. Below is a small
> > > program that duplicates the issue.
> > 
> > [...]
> > 
> > FWIW I can reproduce this easily with -rc3 on my x86 laptop running
> > hackbench in parallel with a tweaked version of your test (using
> > _SC_NPROCESSORS_ONLN instead of _SC_NPROCESSORS_CONF and hotplugging off
> > both CPU2 and CPU3).
> > 
> 
> OK; found it, or at least, I stopped being able to make my box explode.
> 
> Drew, can you try the below and confirm? Its still got all the debug goo
> in too, but *shees* took me long enough.

This works great for me. No Oops or garbage data when a core is
offlined.

> +	raw_spin_lock(&ctx->lock);
> +	ctx_sched_out(ctx, cpuctx, EVENT_ALL);
> +
> +	list_for_each_entry(event, &ctx->event_list, event_entry)
> +		event->state = PERF_EVENT_STATE_off;
> +
> +	raw_spin_unlock(&ctx->lock);

I changed PERF_EVENT_STATE_off to PERF_EVENT_STATE_OFF.

Drew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ