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-next>] [day] [month] [year] [list]
Date:	Mon, 13 Aug 2012 13:57:11 -0700
From:	Thai Bui <blquythai@...il.com>
To:	Randy Dunlap <rdunlap@...otime.net>
Cc:	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	Thai Bui <blquythai@...il.com>
Subject: [PATCH 1/1] boot: Put initcall_debug into its own Kconfig option DEBUG_INITCALL

Putting DEBUG_INITCALL config option to compile out the command-line option
"initcall_debug".

Signed-off-by: Thai Bui <blquythai@...il.com>
Reviewed-by: Josh Triplett <josh@...htriplett.org>
---
 Documentation/kernel-parameters.txt |    3 ++-
 include/linux/init.h                |    4 ++++
 init/main.c                         |    2 ++
 lib/Kconfig.debug                   |    9 +++++++++
 4 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index d99fd9c..3dbaf15 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1026,7 +1026,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
 	initcall_debug	[KNL] Trace initcalls as they are executed.  Useful
 			for working out where the kernel is dying during
-			startup.
+			startup. DEBUG_INITCALL needs to be enabled in order
+			for this option to work.
 
 	initrd=		[BOOT] Specify the location of the initial ramdisk
 
diff --git a/include/linux/init.h b/include/linux/init.h
index 6b95109..d2f31f1 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -157,7 +157,11 @@ void prepare_namespace(void);
 
 extern void (*late_time_init)(void);
 
+#ifdef CONFIG_DEBUG_INITCALL
 extern bool initcall_debug;
+#else
+static const bool initcall_debug = false;
+#endif /* CONFIG_DEBUG_INITCALL */
 
 #endif
   
diff --git a/init/main.c b/init/main.c
index ff49a6d..65837f7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -648,8 +648,10 @@ static void __init do_ctors(void)
 #endif
 }
 
+#ifdef CONFIG_DEBUG_INITCALL
 bool initcall_debug;
 core_param(initcall_debug, initcall_debug, bool, 0644);
+#endif /* CONFIG_DEBUG_INITCALL */
 
 static char msgbuf[64];
 
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 8745ac7..424ac93 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -769,6 +769,15 @@ config DEBUG_WRITECOUNT
 
 	  If unsure, say N.
 
+config DEBUG_INITCALL
+	bool "Debug initcalls as they are executed"
+	depends on DEBUG_KERNEL
+	help
+	  Enable this for tracing initcalls during startup. Useful for working
+	  out where the kernel is dying during startup.
+
+	  If unsure, say N
+
 config DEBUG_MEMORY_INIT
 	bool "Debug memory initialisation" if EXPERT
 	default !EXPERT
-- 
1.7.9.5

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