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:	Wed, 4 Apr 2007 10:13:05 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Badari Pulavarty <pbadari@...il.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: 2.6.21-rc5-mm4 (SLUB powerpc)

On Wed, 4 Apr 2007, Badari Pulavarty wrote:

> Well !! Helps a little, but not enough to boot (hangs little later) :(
> I will try to get stack trace for that.

Great! Thanks for all the debugging help.

 
> Processor 6 found.
> Processor 7 found.
> Brought up 8 CPUs
> mm/memory.c:111: bad pud c0000000f20c0480.

Hmmm... Checking for slabs used in powerpc arch code:

The pgtable cache is configured as


          pgtable_cache[i] = kmem_cache_create(name,
                                                     size, size,
                                                     SLAB_HWCACHE_ALIGN |
                                                     SLAB_MUST_HWCACHE_ALIGN,
                                                     zero_ctor,
                                                     NULL);

Hmmm.... aligned slabs at size and then we MUST_HWCACHE_ALIGN?? Two 
competing alignment requirements and a constructor. Constructor requires
the moving of the free pointer after the slab and thus increases the slab 
size.

Sigh. IF SLAB_HWCACHE_ALIGN is set then SLUB believes this to be the 
ultimate demand that overrides all other alignments and only aligns to the 
cacheline. Try the following fix:



SLUB: Treat SLAB_HWCACHE_ALIGN as a mininum and not as *the* alignment

If the specified alignment is higher than L1_CACHE_BYTES and
SLAB_HWCACHE_ALIGN is set then use the higher alignment.

Signed-off-by: Christoph Lameter <clameter@....com>

Index: linux-2.6.21-rc5-mm4/mm/slub.c
===================================================================
--- linux-2.6.21-rc5-mm4.orig/mm/slub.c	2007-04-04 10:09:20.000000000 -0700
+++ linux-2.6.21-rc5-mm4/mm/slub.c	2007-04-04 10:09:42.000000000 -0700
@@ -1373,10 +1373,7 @@ static int calculate_order(int size)
 static unsigned long calculate_alignment(unsigned long flags,
 		unsigned long align)
 {
-	if (flags & SLAB_HWCACHE_ALIGN)
-		return L1_CACHE_BYTES;
-
-	if (flags & SLAB_MUST_HWCACHE_ALIGN)
+	if (flags & (SLAB_MUST_HWCACHE_ALIGN | SLAB_HWCACHE_ALIGN))
 		return max_t(unsigned long, align, L1_CACHE_BYTES);
 
 	if (align < ARCH_SLAB_MINALIGN)
-
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