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] [day] [month] [year] [list]
Date:	Tue, 30 Oct 2012 08:24:16 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Corey Minyard <cminyard@...sta.com>, minyard@....org,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	OpenIPMI Developers <openipmi-developer@...ts.sourceforge.net>
Subject: Re: [PATCH v2] Remove uninitialized_var()


* David Rientjes <rientjes@...gle.com> wrote:

> On Sun, 28 Oct 2012, Ingo Molnar wrote:
> 
> > I left it a bit mystic because in some cases this macro was 
> > mis-used not to suppress GCC being wrong, but to hide GCC being 
> > *right*: for example unused variable warnings in cases like:
> > 
> >    int uninitialized_var(var);
> > 
> >    #ifdef XYZ
> >    var = ...;
> >    ...
> >    #endif
> > 
> > which (ab-)use was no doubt actively dangerous beyond being 
> > ugly. One such example is in arch/x86/mm/numa.c. (These cases 
> > now turn into clear (and always harmless) compiler warnings, as 
> > they should.)
> > 
> 
> I like initializing them to 0 or NULL because it will still 
> emit the "unused variable" warnings whereas using 
> uninitialized_var() would not with -Wall.  It's quite possible 
> that uninitialized_var() is actually suppressing this warning 
> for variables that aren't used.

Yeah.

> I fixed a bug that was attributed to uninitialized var for rc1 
> in 43385846968b ("fs, xattr: fix bug when removing a name not 
> in xattr list"), so thanks very much for removing it entirely.

Ok - looks like everyone is happy with this version - I'll send 
a refreshed version of this patch to Linus near the end of the 
v3.8 merge window.

Note, I won't push it out into linux-next for much of the 
development window (or at all), as there's very little gain from 
all the interaction and churn this would cause with various 
trees, nor does it seem necessary to split it up into a hundred 
small patches. We'll just pull the trigger before v3.8-rc1 with 
one well-tested patch and that's it.

Unless Linus objects to this workflow.

Thanks,

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