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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 10 Nov 2017 07:51:52 +0800 From: Miles Chen <miles.chen@...iatek.com> To: Christopher Lameter <cl@...ux.com> CC: Pekka Enberg <penberg@...nel.org>, David Rientjes <rientjes@...gle.com>, Joonsoo Kim <iamjoonsoo.kim@....com>, Andrew Morton <akpm@...ux-foundation.org>, <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>, <wsd_upstream@...iatek.com>, <linux-mediatek@...ts.infradead.org> Subject: Re: [PATCH] slub: Fix sysfs duplicate filename creation when slub_debug=O On Thu, 2017-11-09 at 09:49 -0600, Christopher Lameter wrote: > On Thu, 9 Nov 2017, Miles Chen wrote: > > > In this fix patch, it disables slab merging if SLUB_DEBUG=O and > > CONFIG_SLUB_DEBUG_ON=y but the debug features are disabled by the > > disable_higher_order_debug logic and it holds the "slab merging is off > > if any debug features are enabled" behavior. > > Sounds good. Where is the patch? > > Sorry for confusing, I meant the original patch of this thread :-) By checking disable_higher_order_debug & (slub_debug & SLAB_NEVER_MERGE), we can detect if a cache is unmergeable but become mergeable because the disable_higher_order_debug=1 logic. Those kind of caches should be keep unmergeable. diff --git a/mm/slub.c b/mm/slub.c index 1efbb812..8cbf9f7 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5704,6 +5704,10 @@ static int sysfs_slab_add(struct kmem_cache *s) return 0; } + if (!unmergeable && disable_higher_order_debug && + (slub_debug & SLAB_NEVER_MERGE)) + unmergeable = 1; + if (unmergeable) { /* * Slabcache can never be merged so we can use the name proper.
Powered by blists - more mailing lists