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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1314717993.5812.11.camel@twins>
Date:	Tue, 30 Aug 2011 17:26:33 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Anton Blanchard <anton@....ibm.com>,
	Avi Kivity <avi@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
	Stephen Hemminger <shemminger@...tta.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Tim Pepper <lnxninja@...ux.vnet.ibm.com>,
	Paul Menage <paul@...lmenage.org>
Subject: Re: [PATCH 05/32] nohz: Move rcu dynticks idle mode handling to
 idle enter/exit APIs

On Tue, 2011-08-30 at 16:32 +0200, Frederic Weisbecker wrote:
> On Tue, Aug 30, 2011 at 01:21:55PM +0200, Peter Zijlstra wrote:
> > On Tue, 2011-08-30 at 01:35 +0200, Frederic Weisbecker wrote:
> > > > That means it has to be in an extended grace period when we stop the
> > > > tick.
> > > 
> > > You mean extended quiescent state?
> > 
> > Yeah that :-)
> > 
> > > As a summary here is what we do:
> > > 
> > > - if we are in the kernel, we can't run into extended quiescent state because
> > > we may make use of rcu anytime there. But if we run nohz we don't have the tick
> > > to notice quiescent states to the RCU machinery and help completing grace periods
> > > so as soon as we receive an rcu IPI from another CPU (due to the grace period
> > > beeing extended because our nohz CPU doesn't report quiescent states), we restart
> > > the tick. We are optimistic enough to consider that we may avoid a lot of ticks
> > > even if there are some risks to be disturbed in some random rates.
> > > So even with the IPI we consider it as an upside.
> > > 
> > > - if we are in userspace we can run in extended quiescent state.
> > 
> > But you can only disable the tick/enter extended quiescent state while
> > in kernel-space. Thus the second clause is precluded from ever being
> > true.
> 
> No, we have a specific stacking in the irq:
> 
> 	rcu_irq_enter()
> 
> 	disable tick...
> 	if (user)
> 		rcu_enter_nohz();
> 
> 	rcu_irq_exit() <-- extended quiescent state entry effective only there
> 
> And by the time we call rcu_irq_exit() and we resume to userspace, we are
> not supposed to have rcu read side critical section (minus the case of
> a signal with do_notify_resume() which I have yet to handle).

See all that is still kernelspace ;-) I think I know what you mean to
say though, but seeing as you note there is even now a known shortcoming
I'm not very confident its a solid construction. What will help us find
such holes?

I would much rather we not rely on such fragile things too much.. this
RCU stuff wants way more thought, as it stands your patch-set doesn't do
anything useful IMO.
--
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