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, 16 Jul 2014 20:42:04 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Borislav Petkov <bp@...en8.de>, Sam Ravnborg <sam@...nborg.org>,
	Boaz Harrosh <openosd@...il.com>, pramod.gurav.etc@...il.com,
	viro@...iv.linux.org.uk, Jason Cooper <jason@...edaemon.net>,
	Markus Mayer <markus.mayer@...aro.org>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/direct-io.c: Fix compilation warning for
 uninitialized variables

[Added Borislav and Sam to cc.]

Christoph Hellwig schreef op wo 16-07-2014 om 10:58 [-0700]:
> On Wed, Jul 16, 2014 at 08:08:41PM +0300, Boaz Harrosh wrote:
> > This is the wrong fix. GCC is wrong here. As shown by Paul Bolle if
> > you move the from / to set from dio_get_page() to here the warning goes away.
> > 
> > The minimal fix must use uninitialized_var() in this case. See patch below
> > 
> > But I think the proper fix Is the one Paul Bolle <pebolle@...cali.nl> sent (above)
> 
> I don't think the initialization is wrong.  The fix of moving the code
> defintively looks nicer,

Whether that was Jason's idea or mine doesn't matter much - though I do
think Boaz quoted part of my fix, but it was just a _draft_.

Anyhow, after all that I got involved in a short thread;
https://lkml.org/lkml/2014/7/8/168 is my contribution. My point is,
basically, that the false positives of -Wmaybe-uninitialized are a "code
smell". They tend to disappear if one reorganizes the code a bit.
Borislav disagrees quite strongly. I didn't really bother with keeping
that thread alive because I feared we'd mainly see more colorful
language.

>  while I think uninitialized_var is horrible wart

Agree totally.

>  that won't get anywhere near my code.
>
> Either way we should merge one of those fixes ASAP..

I'd like my builds to be warning free too. And it would be nice to know
whether there's consensus on how to deal with the false positives of
-Wmaybe-uninitialized that make it into mainline.


Paul Bolle

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