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]
Date:	Fri, 10 Jul 2009 09:54:39 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Christoph Lameter <cl@...ux-foundation.org>,
	Larry Finger <Larry.Finger@...inger.net>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Kernel Testers List <kernel-testers@...r.kernel.org>,
	Johannes Berg <johannes@...solutions.net>
Subject: Re: [patch v2] slub: add option to disable higher order debugging
 slabs

On Tue, 7 Jul 2009, Christoph Lameter wrote:
> > > + * Debugging flags that require metadata to be stored in the slab, up to
> > > + * DEBUG_SIZE in size.
> > > + */
> > > +#define DEBUG_SIZE_FLAGS (SLAB_RED_ZONE | SLAB_POISON | SLAB_STORE_USER)
> > > +#define DEBUG_SIZE (3 * sizeof(void *) + 2 * sizeof(struct track))
> > 
> > There is no need for DEBUG_SIZE since slub keeps both the size of the
> > object kmem_cache->objsize and the size with the metadata kmem_cache->size
> > 
> > If the order of both is different then the order would increase.

On Thu, 2009-07-09 at 16:26 -0700, David Rientjes wrote:
> Without DEBUG_SIZE_FLAGS, the only way to determine what flags have 
> increased the size is in calculate_sizes() and then disable them by 
> default if slub_debug=O is specified.  calculate_sizes() is used by 
> the `store', `poison', and `red_zone' callbacks, so the admin still has 
> the ability to enable these options even though slub_debug=O was used.
> 
> So we can either mask off the size-increasing debug bits when the cache is 
> created in kmem_cache_flags() like I did, or we can move the logic to 
> calculate_sizes() with an added formal to determine whether this is from 
> kmem_cache_open() or one of the attribute callbacks.
> 
> I think my solution is the cleanest and provides a single entity, 
> DEBUG_SIZE_FLAGS, which specifies the flags that slub_debug=O clears if 
> the minimum order increases.

Yup, agreed. I applied the patch, thanks everyone!

			Pekka

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