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.00.1209261813300.7072@chino.kir.corp.google.com>
Date:	Wed, 26 Sep 2012 18:16:11 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Glauber Costa <glommer@...allels.com>
cc:	Christoph Lameter <cl@...ux.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Michal Hocko <mhocko@...e.cz>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH] slab: Ignore internal flags in cache creation

On Wed, 26 Sep 2012, Glauber Costa wrote:

> So the problem I am facing here is that when I am creating caches from
> memcg, I would very much like to reuse their flags fields. They are
> stored in the cache itself, so this is not a problem. But slab also
> stores that flag, leading to the precise BUG_ON() on CREATE_MASK that
> you quoted.
> 
> In this context, passing this flag becomes completely valid, I just need
> that to be explicitly masked out.
> 
> What is your suggestion to handle this ?
> 

I would suggest cachep->flags being used solely for the flags passed to 
kmem_cache_create() and seperating out all "internal flags" based on the 
individual slab allocator's implementation into a different field.  There 
should be no problem with moving CFLGS_OFF_SLAB elsewhere, in fact, I just 
removed a "dflags" field from mm/slab.c's kmem_cache that turned out never 
to be used.  You could simply reintroduce a new "internal_flags" field and 
use it at your discretion.
--
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