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]
Date:	Sat, 27 Feb 2016 12:30:33 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Peter Anvin <hpa@...or.com>, Oleg Nesterov <oleg@...hat.com>,
	linux-arch@...r.kernel.org, Tejun Heo <tj@...nel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Rafael Wysocki <rafael.j.wysocki@...el.com>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Rik van Riel <riel@...hat.com>,
	"Srivatsa S. Bhat" <srivatsa@....edu>,
	Sebastian Siewior <bigeasy@...utronix.de>,
	Paul Turner <pjt@...gle.com>
Subject: Re: [patch 20/20] rcu: Make CPU_DYING_IDLE an explicit call

On Sat, 27 Feb 2016, Paul E. McKenney wrote:
> On Sat, Feb 27, 2016 at 08:47:41AM +0100, Thomas Gleixner wrote:
> > On Fri, 26 Feb 2016, Paul E. McKenney wrote:
> > > > > --- a/kernel/cpu.c
> > > > > +++ b/kernel/cpu.c
> > > > > @@ -762,6 +762,7 @@ void cpuhp_report_idle_dead(void)
> > > > >  	BUG_ON(st->state != CPUHP_AP_OFFLINE);
> > > > >  	st->state = CPUHP_AP_IDLE_DEAD;
> > > > >  	complete(&st->done);
> > > > 
> > > > What prevents the other CPU from killing this CPU at this point, so
> > > > that this CPU does not tell RCU that it is dead?
> > > >
> > > > I agree that the odds should be low, but there are all manner of things
> > > > that might delay a CPU for just a little bit too long...
> > > > 
> > > > Or am I missing something subtle here?
> > 
> > No. The reason why I moved the rcu call past the complete is, that otherwise
> > complete() complains about rcu being dead already. Hmm, but you are right. In
> > theory the other side could allow physical removal before it actually told rcu
> > that it's gone.
> 
> There is one case where this is OK, and that is where the outgoing CPU
> puts itself to sleep (or whatever) without help from the other CPU.

That's the case. It's the last call before the outgoing CPU goes into
arch_cpu_idle_dead(). There is no involvement of the controlling CPU at this
point. It just wants to know, that the outgoing one is dead finally.

Thanks,

	tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ