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:	Tue, 26 Jul 2011 16:30:38 -0400
From:	Arnaud Lacombe <lacombar@...il.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] core/locking changes for v3.1

Hi,

On Mon, Jul 25, 2011 at 3:48 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Mon, Jul 25, 2011 at 12:04 PM, Ingo Molnar <mingo@...e.hu> wrote:
>> ..
>> net/netfilter/nf_conntrack_core.c: In function ‘nf_conntrack_init’:
>> net/netfilter/nf_conntrack_core.c:1579:3: warning: the comparison
>> will always evaluate as ‘true’ for the address of
>> ‘nf_conntrack_attach’ will never be NULL [-Waddress]
>
> These all seem to be essentially compiler bugs.
>
> We have macros that do generic things (in this case
> "rcu_assign_pointer()" and tests their values. The fact that the tests
> sometimes end up being statically true (or false) is not something the
> compiler should complain about - it should use it to optimize the
> code.
>
> Sad.
>
I'm not sure that it is the compiler fault, or a limitation of the C
language which has no notion of templates and obliges people to do
convoluted hack mixing __typeof__ and macros.

I'd have been interested to use the 'auto' keyword in generic static
inlines declaration. Instead, we have to deal with __typeof__ and
macros, which have no real signification for the compiler itself, so
it cannot make the difference between a conditional in a macros, there
for genericity, and "real" code, where such a warning would be useful.

my 0.2 c.
 - Arnaud

> We can make a compiler bug-report, or disable -Waddress. Or maybe we
> can write the tests in a way that doesn't trigger the compiler bug.
>
> This same issue is why I hated -Wsign-compare. Some of the things gcc
> complained about were just technically moronic. So compiler warnings
> are not always a good thing.
>
>                  Linus
>
--
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