From: Pekka Enberg <penberg@cs.helsinki.fi>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, vegard.nossum@gmail.com,
cl@linux-foundation.org
Subject: [PATCH] kmemcheck: Disable SLUB and SLAB debugging when kmemcheck is enabled
Date: Mon, 23 Feb 2009 11:35:12 +0200 [thread overview]
Message-ID: <1235381712.6216.22.camel@penberg-laptop> (raw)
From: Pekka Enberg <penberg@cs.helsinki.fi>
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@gmail.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
arch/x86/Kconfig.debug | 2 +-
init/Kconfig | 2 +-
lib/Kconfig.debug | 2 +-
3 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/init/Kconfig b/init/Kconfig
index f068071..36617a4 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -890,7 +890,7 @@ config PCI_QUIRKS
config SLUB_DEBUG
default y
bool "Enable SLUB debugging support" if EMBEDDED
- depends on SLUB && SYSFS
+ depends on SLUB && SYSFS && !KMEMCHECK
help
SLUB has extensive debug support features. Disabling these can
result in significant savings in code size. This also disables
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 29044f5..768e426 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
--
1.5.4.3
next reply other threads:[~2009-02-23 9:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 9:35 Pekka Enberg [this message]
2009-02-23 15:25 ` Sitsofe Wheeler
2009-02-23 15:41 ` Christoph Lameter
2009-02-23 17:33 ` Pekka Enberg
2009-02-25 19:17 ` Vegard Nossum
2009-02-25 21:23 ` Christoph Lameter
2009-02-26 7:17 ` Pekka Enberg
2009-02-26 8:16 ` Vegard Nossum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1235381712.6216.22.camel@penberg-laptop \
--to=penberg@cs.helsinki.fi \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=vegard.nossum@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®