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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Feb 2009 18:51:13 +0100
From:	Giuseppe CAVALLARO <peppe.cavallaro@...com>
To:	linux-kernel@...r.kernel.org
Cc:	Giuseppe Cavallaro <peppe.cavallaro@...com>
Subject: [PATCH] slab: fix slab flags for archs use alignment larger 64-bit

I think, this fix is necessary for all the architectures want to
perform DMA into kmalloc caches and need a guaranteed alignment
larger than the alignment of a 64-bit integer.
An example is sh architecture where ARCH_KMALLOC_MINALIGN is L1_CACHE_BYTES.

As side effect, these kind of objects cannot be visible
within the /proc/slab_allocators file.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@...com>
---
 mm/slab.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index ddc41f3..031d785 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2262,7 +2262,7 @@ kmem_cache_create (const char *name, size_t size, size_t align,
 		ralign = align;
 	}
 	/* disable debug if necessary */
-	if (ralign > __alignof__(unsigned long long))
+	if (ralign > ARCH_KMALLOC_MINALIGN)
 		flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
 	/*
 	 * 4) Store it.
-- 
1.5.6.6

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