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:   Sat,  9 Dec 2017 18:40:33 +0100
From:   Vincent Legoll <vincent.legoll@...il.com>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Ingo Molnar <mingo@...nel.org>,
        Byungchul Park <byungchul.park@....com>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Nicholas Piggin <npiggin@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org
Cc:     Vincent Legoll <vincent.legoll@...il.com>
Subject: [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all

No need to get into the submenu to disable all
"Memory Debugging"-related config entries.

This makes it easier to disable all "Memory Debugging" config options
without entering the submenu. It will also enable one to see that
en/dis-abled state from the outside menu.

This is only intended to change menuconfig UI, not change
the config dependencies.

Changes since v1:
Move some invisible config options ouit of the if/endif DEBUG_MEMORY
block to alleviate the warnings:
"selects XXX which has unmet direct dependencies"
This moves the HAVE_ARCH_KASAN out of Kconfig.kasan

Signed-off-by: Vincent Legoll <vincent.legoll@...il.com>
---
 lib/Kconfig.debug | 28 +++++++++++++++++-----------
 lib/Kconfig.kasan |  3 ---
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 947d3e2ed5c2..19ca76e7b9ed 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -436,7 +436,10 @@ config DEBUG_KERNEL
 	  Say Y here if you are developing drivers or trying to debug and
 	  identify kernel problems.
 
-menu "Memory Debugging"
+menuconfig DEBUG_MEMORY
+	bool "Memory Debugging"
+
+if DEBUG_MEMORY
 
 source mm/Kconfig.debug
 
@@ -539,9 +542,6 @@ config SLUB_STATS
 	  out which slabs are relevant to a particular load.
 	  Try running: slabinfo -DA
 
-config HAVE_DEBUG_KMEMLEAK
-	bool
-
 config DEBUG_KMEMLEAK
 	bool "Kernel memory leak detector"
 	depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
@@ -636,9 +636,6 @@ config DEBUG_VM_PGFLAGS
 
 	  If unsure, say N.
 
-config ARCH_HAS_DEBUG_VIRTUAL
-	bool
-
 config DEBUG_VIRTUAL
 	bool "Debug VM translations"
 	depends on DEBUG_KERNEL && ARCH_HAS_DEBUG_VIRTUAL
@@ -708,9 +705,6 @@ config DEBUG_HIGHMEM
 	  This option enables additional error checking for high memory
 	  systems.  Disable for production systems.
 
-config HAVE_DEBUG_STACKOVERFLOW
-	bool
-
 config DEBUG_STACKOVERFLOW
 	bool "Check for stack overflows"
 	depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW
@@ -731,7 +725,19 @@ config DEBUG_STACKOVERFLOW
 
 source "lib/Kconfig.kasan"
 
-endmenu # "Memory Debugging"
+endif # DEBUG_MEMORY
+
+config HAVE_ARCH_KASAN
+	bool
+
+config ARCH_HAS_DEBUG_VIRTUAL
+	bool
+
+config HAVE_DEBUG_KMEMLEAK
+	bool
+
+config HAVE_DEBUG_STACKOVERFLOW
+	bool
 
 config ARCH_HAS_KCOV
 	bool
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index bd38aab05929..2396d5116e20 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -1,6 +1,3 @@
-config HAVE_ARCH_KASAN
-	bool
-
 if HAVE_ARCH_KASAN
 
 config KASAN
-- 
2.14.1

Powered by blists - more mailing lists