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:	Fri, 3 Feb 2012 01:17:36 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
	fweisbec@...il.com, patches@...aro.org,
	"Paul E. McKenney" <paul.mckenney@...aro.org>
Subject: Re: [PATCH RFC tip/core/rcu 38/41] rcu: Rework detection of use of
 RCU by offline CPUs

On Thu, Feb 02, 2012 at 10:31:22AM -0800, Paul E. McKenney wrote:
> On Wed, Feb 01, 2012 at 10:11:06PM -0800, Josh Triplett wrote:
> > On Wed, Feb 01, 2012 at 11:41:56AM -0800, Paul E. McKenney wrote:
> > > From: "Paul E. McKenney" <paul.mckenney@...aro.org>
> > > 
> > > Because newly offlined CPUs continue executing after completing the
> > > CPU_DYING notifiers, they legitimately enter the scheduler and use
> > > RCU while appearing to be offline.  This calls for a more sophisticated
> > > approach as follows:
> > > 
> > > 1.	RCU marks the CPU online during the CPU_UP_PREPARE phase.
> > > 
> > > 2.	RCU marks the CPU offline during the CPU_DEAD phase.
> > > 
> > > 3.	Diagnostics regarding use of read-side RCU by offline CPUs use
> > > 	RCU's accounting rather than the cpu_online_map.  (Note that
> > > 	__call_rcu() still uses cpu_online_map to detect illegal
> > > 	invocations within CPU_DYING notifiers.)
> > > 
> > > 4.	Offline CPUs are prevented from hanging the system by
> > > 	force_quiescent_state(), which pays attention to cpu_online_map.
> > > 	Some additional work (in a later commit) will be needed to
> > > 	guarantee that force_quiescent_state() waits a full jiffy before
> > > 	assuming that a CPU is offline, for example, when called from
> > > 	idle entry.
> > > 
> > > This approach avoids the false positives encountered when attempting to
> > > use more exact classification of CPU online/offline state.
> > 
> > Doesn't this fix need to happen *before* the earlier patches in this
> > series that add splats for RCU usage while offline?  Otherwise,
> > bisection can hit those splats.
> 
> If someone actually does hit the splats during a real bisection, I will
> buy you the beverage of your choice.  ;-)

Funny, but while the likelihood of any particular bug getting hit during
bisection remains relatively low simply due to the chance of hitting
the small range of commits where it can happen, I still think it would
make sense to reorder the patch series so it can't happen at all. :)

- Josh Triplett
--
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