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
| ||
|
Date: Tue, 19 Jun 2007 15:38:01 -0700 (PDT) From: Christoph Lameter <clameter@....com> To: Andrew Morton <akpm@...ux-foundation.org> cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, Pekka Enberg <penberg@...helsinki.fi>, suresh.b.siddha@...el.com Subject: Re: [patch 10/26] SLUB: Faster more efficient slab determination for __kmalloc. On Tue, 19 Jun 2007, Andrew Morton wrote: > On Tue, 19 Jun 2007 15:22:36 -0700 (PDT) > Christoph Lameter <clameter@....com> wrote: > > > On Tue, 19 Jun 2007, Andrew Morton wrote: > > > > > On Mon, 18 Jun 2007 02:58:48 -0700 > > > clameter@....com wrote: > > > > > > > + BUG_ON(KMALLOC_MIN_SIZE > 256 || > > > > + (KMALLOC_MIN_SIZE & (KMALLOC_MIN_SIZE - 1))); > > > > > > BUILD_BUG_ON? > > > > > Does not matter. That code is __init. > > Finding out at compile time is better. Ok and BUILD_BUG_ON really works? Had some bad experiences with it. Signed-off-by: Christoph Lameter <clameter@....com> Index: linux-2.6.22-rc4-mm2/mm/slub.c =================================================================== --- linux-2.6.22-rc4-mm2.orig/mm/slub.c 2007-06-19 15:36:57.000000000 -0700 +++ linux-2.6.22-rc4-mm2/mm/slub.c 2007-06-19 15:37:05.000000000 -0700 @@ -3079,7 +3079,7 @@ void __init kmem_cache_init(void) * Make sure that nothing crazy happens if someone starts tinkering * around with ARCH_KMALLOC_MINALIGN */ - BUG_ON(KMALLOC_MIN_SIZE > 256 || + BUILD_BUG_ON(KMALLOC_MIN_SIZE > 256 || (KMALLOC_MIN_SIZE & (KMALLOC_MIN_SIZE - 1))); for (i = 8; i < KMALLOC_MIN_SIZE;i++) - 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