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]
Message-Id: <1235632643.5465.0.camel@penberg-laptop>
Date:	Thu, 26 Feb 2009 09:17:23 +0200
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Christoph Lameter <cl@...ux-foundation.org>
Cc:	Vegard Nossum <vegard.nossum@...il.com>, mingo@...e.hu,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kmemcheck: Disable SLUB and SLAB debugging when
	kmemcheck is enabled

On Wed, 25 Feb 2009, Vegard Nossum wrote:
> > Can you rethink whether SLUB_DEBUG or SLUB_DEBUG_ON is the one we
> > really want to depend on !KMEMCHECK, and either submit a new patch or
> > convince me that this is sufficient?

On Wed, 2009-02-25 at 16:23 -0500, Christoph Lameter wrote:
> !SLUB_DEBUG_ON is the right thing to depend on.

Here's a patch to do that.

			Pekka

>>From bae2afd233c24d766e20e09bb92c67c0e5ea16e3 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@...helsinki.fi>
Date: Mon, 23 Feb 2009 11:35:13 +0200
Subject: [PATCH] kmemcheck: Disable SLUB and SLAB debugging when kmemcheck is enabled

Enabling kmemcheck in Kconfig is a painful experience. Lets make it a
tad bit easier by inverting the dependencies to SLUB and SLAB debugging.
As kmemcheck is more powerful than slab debugging, disable the latter
functionality if an user enables kmemcheck.

Cc: Vegard Nossum <vegard.nossum@...il.com>
Cc: Christoph Lameter <cl@...ux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
 arch/x86/Kconfig.debug |    2 +-
 lib/Kconfig.debug      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index de186c5..3d1d593 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -276,7 +276,7 @@ menuconfig KMEMCHECK
 	bool "kmemcheck: trap use of uninitialized memory"
 	depends on X86
 	depends on !X86_USE_3DNOW
-	depends on (SLUB && !SLUB_DEBUG_ON) || (SLAB && !DEBUG_SLAB)
+	depends on SLUB || SLAB
 	depends on !CC_OPTIMIZE_FOR_SIZE
 	depends on !DEBUG_PAGEALLOC
 	depends on !FUNCTION_TRACER
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 29044f5..e9a930c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -262,7 +262,7 @@ config DEBUG_OBJECTS_ENABLE_DEFAULT
 
 config DEBUG_SLAB
 	bool "Debug slab memory allocations"
-	depends on DEBUG_KERNEL && SLAB
+	depends on DEBUG_KERNEL && SLAB && !KMEMCHECK
 	help
 	  Say Y here to have the kernel do limited verification on memory
 	  allocation as well as poisoning memory on free to catch use of freed
@@ -274,7 +274,7 @@ config DEBUG_SLAB_LEAK
 
 config SLUB_DEBUG_ON
 	bool "SLUB debugging on by default"
-	depends on SLUB && SLUB_DEBUG
+	depends on SLUB && SLUB_DEBUG && !KMEMCHECK
 	default n
 	help
 	  Boot with debugging on by default. SLUB boots by default with
-- 
1.5.4.3



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