Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180117193114.GB25862@bombadil.infradead.org>
Date: Wed, 17 Jan 2018 11:31:14 -0800
From: Matthew Wilcox <willy@...radead.org>
To: Christopher Lameter <cl@...ux.com>
Cc: Kees Cook <keescook@...omium.org>, linux-mm@...ck.org,
	Rik van Riel <riel@...hat.com>, Matthew Garrett <mjg59@...gle.com>,
	kernel-hardening@...ts.openwall.com
Subject: Re: kmem_cache_attr (was Re: [PATCH 04/36] usercopy: Prepare for
 usercopy whitelisting)

On Wed, Jan 17, 2018 at 11:42:34AM -0600, Christopher Lameter wrote:
> On Tue, 16 Jan 2018, Matthew Wilcox wrote:
> 
> > struct kmem_cache_attr {
> > 	char name[16];
> 
> That doesnt work. memcg needs long slab names. Sigh.

Oof.  That's ugly.  Particularly ugly in that it could actually share the
attr with the root cache, except for the name.

We could put a char * in the kmem_cache which (if not NULL) overrides
the attr->name?  Probably want a helper to replace the endearingly short
's->name'.  Something like:

#define slab_name(s)	s->name ?: s->attr->name

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.