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, 11 Feb 2015 13:23:07 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Quentin Lambert <lambert.quentin@...il.com>,
	devel@...verdev.osuosl.org, sparmaintainer@...sys.com,
	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
	Benjamin Romer <benjamin.romer@...sys.com>,
	David Kershner <david.kershner@...sys.com>
Subject: Re: [PATCH 1/1] staging: unisys: Remove allocation from declaration
 line

On Wed, Feb 11, 2015 at 06:26:27AM +0800, Greg Kroah-Hartman wrote:
> On Tue, Feb 10, 2015 at 02:02:14PM +0100, Quentin Lambert wrote:
> > This patch removes allocation from declaration line because
> > people are known to gloss over declarations.
> 
> Again, who are these lazy people, and why are they reading kernel code?
> 

>From my work with smatch:
1) Probably 70-80% of inconsistent NULL checking is when done in the
   initializer.  I'm sending a patch for one of these today.
2) If there is an allocation in the initializer then it's more likely
   that the NULL check will be missing.
Initializers are a blind spot that people do not read.  It's not just
one maintainer, it's consistent across the board.

Also if you put an allocation in the initializer then it almost always
has to be mangled to fit in 80 characters and it looks ugly.  But after
these patches then all the allocations fit naturally.

Plus you have to have that blank line to separate the initialization
paragraph from the paragraph with the check for allocation failure.

Really, it is fairly uncommon to put an allocation in the initalizer.

regards,
dan carpenter
--
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