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: <20100319224932.GE2520@linux.vnet.ibm.com>
Date:	Fri, 19 Mar 2010 15:49:32 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org, laijs@...fujitsu.com,
	dipankar@...ibm.com, josh@...htriplett.org, dvhltc@...ibm.com,
	niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, Valdis.Kletnieks@...edu, dhowells@...hat.com,
	eric.dumazet@...il.com
Subject: Re: [RFC patch 2/3] tree/tiny rcu: Add debug RCU head objects (v3)

On Sat, Mar 20, 2010 at 12:10:00AM +0200, Alexey Dobriyan wrote:
> On Fri, Mar 19, 2010 at 04:47:41PM -0400, Mathieu Desnoyers wrote:
> > Helps finding racy users of call_rcu(), which results in hangs because list
> > entries are overwritten and/or skipped.
> > 
> > This new patch version is based on the debugobjects with the newly introduced
> > "active state" tracker.
> > 
> > Non-initialized entries are all considered as "statically initialized". An
> > activation fixup (triggered by call_rcu()) takes care of performing the debug
> > object initialization without issuing any warning. Since we cannot increase the
> > size of struct rcu_head, I don't see much room to put an identifier for
> > statically initialized rcu_head structures. So for now, we have to live without
> > "activation without explicit init" detection. But the main purpose of this debug
> > option is to detect double-activations (double call_rcu() use of a rcu_head
> > before the callback is executed), which is correctly addressed here.
> > 
> > This also detects potential internal RCU callback corruption, which would cause
> > the callbacks to be executed twice.
> 
> Is this useful?
> 
> Basic usage is so there no double call_rcu():
> 
> 	if (atomic_dec_and_test())
> 		call_rcu()

I believe that it is.  There have been a few cases of call_rcu() being
invoked twice without a grace period between the two invocations.
Mathieu's patch would catch this sort of misbehavior.

That said, I do agree that if everyone followed the rules, there would
be no need for Mathieu's patch -- and there would be no need for much
else, besides.  ;-)

							Thanx, Paul
--
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