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: <alpine.DEB.2.02.1406181623400.22789@chino.kir.corp.google.com>
Date:	Wed, 18 Jun 2014 16:28:48 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Heiko Carstens <heiko.carstens@...ibm.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Ian Kent <raven@...maw.net>,
	Hendrik Brueckner <brueckner@...ux.vnet.ibm.com>,
	Thorsten Diehl <thorsten.diehl@...ibm.com>,
	Andrea Righi <andrea@...terlinux.com>,
	Christoph Hellwig <hch@...radead.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Stefan Bader <stefan.bader@...onical.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] proc/stat: convert to single_open_size()

On Mon, 16 Jun 2014, Heiko Carstens wrote:

> Use seq_file's single_open_size() to preallocate a buffer that is large
> enough to hold the whole output, instead of open coding it.
> Also calculate the requested size using the number of online cpus instead
> of possible cpus, since the size of the output only depends on the number
> of online cpus.
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@...ibm.com>

Acked-by: David Rientjes <rientjes@...gle.com>

I have no idea why the check for size > KMALLOC_MAX_SIZE was there, all 
slab allocators will fallback to the page allocator and the slowpath will 
return NULL.
--
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