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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 9 Sep 2008 22:05:17 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Adrian Bunk <bunk@...nel.org>
Cc:	Andi Kleen <andi@...stfloor.org>,
	"Keith A. Prickett" <keithp@...vell.com>,
	linux-kernel@...r.kernel.org
Subject: Re: Building Kernel with -O0

> > I think a few more cases crept in where it was common to write
> > build time asserts as
> > 
> >       if (some condition the compiler evaluates at runtime)
>                                                      ^^^^^^^
> buildtime

Thank for the correction.

> 
> >          __error_condition_xyz_is_false(); 
> >  
> > and this obviously relies on the optimizer to build. But these
> > are all slowly moving over the BUILD_BUG_ON() which also doesn't
> > rely on the optimizer, so it's also obsolete.
> >...
> 
> The reason why it works for Keith at all seems to be that even with -O0 
> gcc already does this kind of optimizations.

What I mean is global optimization over the whole function, like
constant propagation. That is required for some of the more complex
macros like the *_user() ones.

Some expression evaluation is required by the C standard (e.g.
otherwise you couldn't generally declare global arrays with expressions)
While that's technically not required in the body of the function
outside declarations the compiler does it normally. But only inside
a statement. 

-Andi
--
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