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:	Fri, 24 May 2013 12:53:23 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Andi Kleen <andi@...stfloor.org>,
	Colin Walters <walters@...bum.org>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	Jiri Slaby <jslaby@...e.cz>,
	Lennart Poettering <mzxreary@...inter.de>,
	Lucas De Marchi <lucas.de.marchi@...il.com>,
	Neil Horman <nhorman@...driver.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] coredump: kill call_count, add core_name_size

On Wed, 15 May 2013 22:12:32 +0200 Oleg Nesterov <oleg@...hat.com> wrote:

> Imho, "atomic_t call_count" is ugly and should die. It buys
> nothing and in fact it can grow more than necessary, expand
> doesn't check if it was already incremented by another task.
> 
> Kill it, and introduce "static int core_name_size" updated by
> expand_corename(). This is obviously racy too but harmless,
> and core_name_size never grows for no reason.
> 
> We do not bother to to calculate the "right" new size, we
> simply do kmalloc(size_we_need) and use ksize() to rely on
> kmalloc_index's decision.
> 
> Finally change format_corename() to use expand_corename(),
> krealloc(NULL) is fine.

The code still looks like a bunch of fluff.  I look at it and think
"wtf, why doesn't it just use kasprintf()". 

If there were any comments in there at all which explained the reason
for the code's existence, perhaps I wouldn't think that.  But there
aren't, so I do.

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