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]
Message-ID: <5405CD51.9020601@gmail.com>
Date:	Tue, 02 Sep 2014 16:59:45 +0300
From:	Boaz Harrosh <openosd@...il.com>
To:	Bruce Fields <bfields@...ldses.org>
CC:	Trond Myklebust <trond.myklebust@...marydata.com>,
	Shakil A Khan <shakilk1729@...il.com>,
	Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
	Linux Kernel mailing list <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	William Andros Adamson <andros@...app.com>,
	Jeffrey Layton <jlayton@...marydata.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] Next branch: authgss: authgss.c: Fix warnings for uninitizlized
 variable expire

On 09/02/2014 04:21 PM, Bruce Fields wrote:
> 
> You'd rather avoid sprinkling that all over, though.  If nothing else it
> increases the chances you'll suppress a legimate warning some day.
> 

But this is exactly why it was created.

If you do the "= 0" then it is gone forever. If you have missed a legitimate
needed assignment, it will be missed as well.

But if you do the uninitialized_var() dance then there is a make option that turns
it off and every once in a while people do a make with it to see if it still
holds.

The diff between foo = 0; and uninitialized_var(foo) is that the programmer is
communicating to his friends that:
	"I have encountered a bogus compiler, this is falsely initialized"

As opposed to =0 the compiler bug is covered up and forgotten

> And unless I'm missing something this one really does look like an
> unambiguous compiler bug.
> 

Right! so that is how you specify this in code at Linux: uninitialized_var(foo);

Putting =0 is way way worse, because it will never be revised and specially
not automatically with a make switch.

And leaving the warning on is even worse because two three of these and people
start to ignore warnings.

> --b.
> 

uninitialized_var was made to be a friend not an enemy, in the face of real
ugliness it is the best we can do. And that is what it should communicate to
everyone. Why has it become everyone's favorite blasphemy I do not know.

Cheers
Boaz

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ