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:	Mon, 9 Jul 2012 19:42:02 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Alessio Igor Bogani <abogani@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Avi Kivity <avi@...hat.com>,
	Chris Metcalf <cmetcalf@...era.com>,
	Christoph Lameter <cl@...ux.com>,
	Geoff Levand <geoff@...radead.org>,
	Gilad Ben Yossef <gilad@...yossef.com>,
	Hakan Akkan <hakanakkan@...il.com>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
	Josh Triplett <josh@...htriplett.org>,
	Kevin Hilman <khilman@...com>,
	Max Krasnyansky <maxk@...lcomm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephen Hemminger <shemminger@...tta.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Sven-Thorsten Dietrich <thebigcorporation@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 1/6] rcu: Settle config for userspace extended quiescent
 state

On Fri, Jul 06, 2012 at 09:31:29AM -0700, Paul E. McKenney wrote:
> On Fri, Jul 06, 2012 at 02:00:13PM +0200, Frederic Weisbecker wrote:
> > Create a new config option under the RCU menu that put
> > CPUs under RCU extended quiescent state (as in dynticks
> > idle mode) when they run in userspace. This require
> > some contribution from architectures to hook into kernel
> > and userspace boundaries.
> > 
> > Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> > Cc: Alessio Igor Bogani <abogani@...nel.org>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Cc: Avi Kivity <avi@...hat.com>
> > Cc: Chris Metcalf <cmetcalf@...era.com>
> > Cc: Christoph Lameter <cl@...ux.com>
> > Cc: Geoff Levand <geoff@...radead.org>
> > Cc: Gilad Ben Yossef <gilad@...yossef.com>
> > Cc: Hakan Akkan <hakanakkan@...il.com>
> > Cc: H. Peter Anvin <hpa@...or.com>
> > Cc: Ingo Molnar <mingo@...nel.org>
> > Cc: Josh Triplett <josh@...htriplett.org>
> > Cc: Kevin Hilman <khilman@...com>
> > Cc: Max Krasnyansky <maxk@...lcomm.com>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Stephen Hemminger <shemminger@...tta.com>
> > Cc: Steven Rostedt <rostedt@...dmis.org>
> > Cc: Sven-Thorsten Dietrich <thebigcorporation@...il.com>
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > ---
> >  arch/Kconfig     |   13 +++++++++++++
> >  init/Kconfig     |   10 ++++++++++
> >  kernel/rcutree.c |    4 ++++
> >  3 files changed, 27 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/Kconfig b/arch/Kconfig
> > index 8c3d957..c2e0ce4 100644
> > --- a/arch/Kconfig
> > +++ b/arch/Kconfig
> > @@ -274,4 +274,17 @@ config SECCOMP_FILTER
> > 
> >  	  See Documentation/prctl/seccomp_filter.txt for details.
> > 
> > +config HAVE_RCU_USER_QS
> > +	bool
> > +	help
> > +	  Provide kernel entry/exit hooks necessary for userspace
> > +	  RCU extended quiescent state. Syscalls and exceptions
> > +	  low level handlers must be wrapped with a call to rcu_user_exit()
> > +	  on entry and rcu_user_enter() before resuming userspace. Irqs
> > +	  entry don't need to call rcu_user_exit() because their high level
> > +	  handlers are protected inside rcu_irq_enter/rcu_irq_exit() but
> > +	  preemption or signal handling on irq exit still need to be protected
> > +	  with a call to rcu_user_exit(). rcu_user_enter() must then be
> > +	  called back on irq exit when the preempted task is back on the CPU.
> > +
> >  source "kernel/gcov/Kconfig"
> > diff --git a/init/Kconfig b/init/Kconfig
> > index d07dcf9..3a4af8f 100644
> > --- a/init/Kconfig
> > +++ b/init/Kconfig
> > @@ -441,6 +441,16 @@ config PREEMPT_RCU
> >  	  This option enables preemptible-RCU code that is common between
> >  	  the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.
> > 
> > +config RCU_USER_QS
> > +	bool "Consider userspace as in RCU extended quiescent state"
> > +	depends on HAVE_RCU_USER_QS && SMP
> 
> OK, I'll bite...  Why the "SMP"?  RCU could make good use of knowing
> about user-mode executing even in UP kernels.

Because Tiny RCU doesn't implement rcu_user_enter()/exit yet. And it
doesn't need it for now.

To better express the constraint I should probably have used:

	depends on TREE_RCU || TREE_PREEMPT_RCU
--
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