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:	Wed, 11 Jan 2012 23:14:31 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	Jan Engelhardt <jengelh@...ozas.de>
Cc:	paulmck@...ux.vnet.ibm.com, laijs@...fujitsu.com,
	manfred@...orfullife.com, dhowells@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu: avoid checking for constant

On Thu, Jan 12, 2012 at 06:11:44AM +0100, Jan Engelhardt wrote:
> When compiling kernel or module code with -O0, "offset" is no longer
> considered a constant, and therefore always triggers the build error
> that BUILD_BUG_ON is defined to yield.
> 
> What is the rationale between the forced constant check,
> introduced in 9ab1544eb4196ca8d05c433b2eb56f74496b1ee3?
[...]
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -805,8 +805,6 @@ void __kfree_rcu(struct rcu_head *head, unsigned long offset)
>  {
>  	typedef void (*rcu_callback)(struct rcu_head *);
>  
> -	BUILD_BUG_ON(!__builtin_constant_p(offset));
> -
>  	/* See the kfree_rcu() header comment. */
>  	BUILD_BUG_ON(!__is_kfree_rcu_offset(offset));

The very next check after the one you removed will break if the
compiler can't check the offset at compile time.

- 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