From c66d7a27b794b43d19a96df03822dd476b03b0a3 Mon Sep 17 00:00:00 2001 From: Sinan Kaya Date: Tue, 14 May 2019 15:44:00 -0700 Subject: init: introduce DEBUG_MISC option Patch series "init: Do not select DEBUG_KERNEL by default", v5. CONFIG_DEBUG_KERNEL has been designed to just enable Kconfig options. Kernel code generatoin should not depend on CONFIG_DEBUG_KERNEL. Proposed alternative plan: let's add a new symbol, something like DEBUG_MISC ("Miscellaneous debug code that should be under a more specific debug option but isn't"), make it depend on DEBUG_KERNEL and be "default DEBUG_KERNEL" but allow itself to be turned off, and then mechanically change the small handful of "#ifdef CONFIG_DEBUG_KERNEL" to "#ifdef CONFIG_DEBUG_MISC". This patch (of 5): Introduce DEBUG_MISC ("Miscellaneous debug code that should be under a more specific debug option but isn't"), make it depend on DEBUG_KERNEL and be "default DEBUG_KERNEL" but allow itself to be turned off, and then mechanically change the small handful of "#ifdef CONFIG_DEBUG_KERNEL" to "#ifdef CONFIG_DEBUG_MISC". Link: http://lkml.kernel.org/r/20190413224438.10802-2-okaya@kernel.org Signed-off-by: Sinan Kaya Reviewed-by: Josh Triplett Reviewed-by: Kees Cook Cc: Anders Roxell Cc: Benjamin Herrenschmidt Cc: Christophe Leroy Cc: Chris Zankel Cc: "David S. Miller" Cc: Florian Westphal Cc: Greg Kroah-Hartman Cc: James Hogan Cc: Jozsef Kadlecsik Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Hocko Cc: Mike Rapoport Cc: Pablo Neira Ayuso Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/Kconfig.debug | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 181bd56238b0..fdfa173651eb 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -460,6 +460,15 @@ config DEBUG_KERNEL Say Y here if you are developing drivers or trying to debug and identify kernel problems. +config DEBUG_MISC + bool "Miscellaneous debug code" + default DEBUG_KERNEL + depends on DEBUG_KERNEL + help + Say Y here if you need to enable miscellaneous debug code that should + be under a more specific debug option but isn't. + + menu "Memory Debugging" source "mm/Kconfig.debug" -- cgit v1.2.3