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: <200902130010.46623.nickpiggin@yahoo.com.au>
Date:	Fri, 13 Feb 2009 00:10:45 +1100
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Matt Mackall <mpm@...enic.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, linux-crypto@...r.kernel.org,
	Geert.Uytterhoeven@...ycom.com
Subject: Re: [PATCH] Export symbol ksize()

On Thursday 12 February 2009 21:50:34 Herbert Xu wrote:
> On Thu, Feb 12, 2009 at 12:45:21PM +0200, Pekka Enberg wrote:
> > Because the API was being widely abused in the nommu code, for example.
> > I'd rather not add it back for this special case which can be handled
> > otherwise.
>
> I'm sorry but that's like banning the use of heaters just because
> they can abused and cause fires.
>
> I think I've said this to you before but in networking we very much
> want to use ksize because the standard case of a 1500-byte packet
> has loads of extra room given by kmalloc which all goes to waste
> right now.

I'm not against the idea of exporting ksize. It is a fairly well
commented function.

I'd be up for nearly anything in the slab layer that speeds up
networking, to be honest ;)


> If we could use ksize then we can stuff loads of metadata in that
> space.

I would be interested to know how that goes. You always have this
circular issue that if a little more space helps significantly, then
maybe it is a good idea to explicitly ask for those bytes. Of course
that larger allocation is also likely to have some slack bytes.

So the benefit you get from using these slack bytes has to be larger
than the cost of using ksize, but smaller than the cost of explicitly
asking for more bytes at alloc time. Interesting...

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