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: <201009231513.40126.arnd@arndb.de>
Date:	Thu, 23 Sep 2010 15:13:39 +0200
From:	Arnd Bergmann <arnd@...db.de>
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, josh@...htriplett.org,
	niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, Valdis.Kletnieks@...edu, dhowells@...hat.com,
	eric.dumazet@...il.com
Subject: Re: [PATCH tip/core/rcu 5/8] rcu: only one evaluation of arg in rcu_dereference_check() unless sparse

On Thursday 23 September 2010, Paul E. McKenney wrote:
> The current version of the __rcu_access_pointer(), __rcu_dereference_check(),
> and __rcu_dereference_protected() macros evaluate their "p" argument
> three times, not counting typeof()s.  This is bad news if that argument
> contains a side effect.  This commit therefore evaluates this argument
> only once in normal kernel builds.  However, the straightforward approach
> defeats sparse's RCU-pointer checking, so when __CHECKER__ is defined,
> the additional pair of evaluations of the "p" argument are performed in
> order to permit sparse to detect misuse of RCU-protected pointers.
> 
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Cc: Arnd Bergmann <arnd@...db.de>

Sorry for not following up with the alternative approach yet. We can always
do that later, for your patch should go into 2.6.36 to fix any problems
arising from unintended macro side-effects.

Acked-by: Arnd Bergmann <arnd@...db.de>
--
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