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.20.1610261541560.3235@east.gentwo.org>
Date:   Wed, 26 Oct 2016 15:47:13 -0500 (CDT)
From:   Christoph Lameter <cl@...ux.com>
To:     Thomas Garnier <thgarnie@...gle.com>
cc:     Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux-MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Greg Thelen <gthelen@...gle.com>
Subject: Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB &
 OBJFREELIST_SLAB

On Wed, 26 Oct 2016, Thomas Garnier wrote:

> Okay, I think for SLAB we can allow everything except the two flags
> mentioned here.

No no no. Just allow the flags already defined in include/linux/slab.h
that can be specd by subsystems when they call into the slab allocators.

> Should I deny certain flags for SLUB? I can allow everything for now.

All allocator should just allow flags defined in include/linux/slab.h be
passed to kmem_cache_create(). That is the API that all allocators need to support.
If someone wants to add new flags then we need to make sure that all
allocators can handle it.


The flags are (from include/linux/slab.h)
/*
 * Flags to pass to kmem_cache_create().
 */
#define SLAB_CONSISTENCY_CHECKS 0x00000100UL    /* DEBUG: Perform (expensive) checks on alloc/free */
#define SLAB_RED_ZONE           0x00000400UL    /* DEBUG: Red zone objs in a cache */
#define SLAB_POISON             0x00000800UL    /* DEBUG: Poison objects */
#define SLAB_HWCACHE_ALIGN      0x00002000UL    /* Align objs on cache lines */
#define SLAB_CACHE_DMA          0x00004000UL    /* Use GFP_DMA memory */
#define SLAB_STORE_USER         0x00010000UL    /* DEBUG: Store the last owner for bug hunting */
#define SLAB_PANIC              0x00040000UL    /* Panic if kmem_cache_create() fails */
#define SLAB_DESTROY_BY_RCU     0x00080000UL    /* Defer freeing slabs to RCU */
#define SLAB_MEM_SPREAD         0x00100000UL    /* Spread some memory over cpuset */
#define SLAB_TRACE              0x00200000UL    /* Trace allocations and frees */
#define SLAB_DEBUG_OBJECTS	0x00400000UL
#define SLAB_NOLEAKTRACE 	0x00800000UL    /* Avoid kmemleak tracing
#define SLAB_NOTRACK      	0x01000000UL
#define SLAB_FAILSLAB          	0x02000000UL    /* Fault injection mark */
#define SLAB_ACCOUNT          	0x04000000UL    /* Account to memcg */
#define SLAB_KASAN              0x08000000UL
#define SLAB_RECLAIM_ACCOUNT    0x00020000UL            /* Objects are reclaimable */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ