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:	Sun, 27 Sep 2009 10:32:40 -0700
From:	Daniel Walker <dwalker@...o99.com>
To:	Cesar Eduardo Barros <cesarb@...arb.net>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Roland Dreier <rolandd@...co.com>
Subject: Re: [PATCH] WARN_ONCE(): use bool for boolean flag

On Sun, 2009-09-27 at 14:24 -0300, Cesar Eduardo Barros wrote:

> I took a quick look, and all uses seem to be directly in a boolean 
> context (within an if()), so there would be no problem. Besides, the 
> unlikely() all these macros end with does a double negation, meaning 
> even if it is an int, it will be either 0 or 1 (but I am not sure I am 
> reading these macros right - it seems CONFIG_TRACE_BRANCH_PROFILING 
> turns all unlikely() into likely()).
> 
> In fact, I was expecting no change at all, since gcc should be able to 
> see it is being treated as a boolean (perhaps I am trusting gcc too 
> much). And to make matters even more confusing, my own test changing all 
> __ret_warn_once to bool and dropping the !! caused an _increase_ of 598 
> bytes (x86-64 defconfig).
> 
>     text    data     bss     dec     hex filename
> 8100553 1207148  991988 10299689         9d2929 vmlinux.warnret.before
> 8101119 1207180  991988 10300287         9d2b7f vmlinux.warnret.after
> 
> (And yes, data increased again.)

Did you have the CONFIG_TRACE_BRANCH_PROFILING option enabled for the
test above?

If this was just your regular base line config , then that is odd .. I
also would think worse case would be no size reduction .. I did my
compile test on x86-32 btw..

Daniel

Daniel

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