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  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:   Wed, 25 Oct 2017 04:12:35 -0700
From:   tip-bot for Byungchul Park <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     peterz@...radead.org, torvalds@...ux-foundation.org,
        mingo@...nel.org, tglx@...utronix.de, hpa@...or.com,
        byungchul.park@....com, linux-kernel@...r.kernel.org
Subject: [tip:locking/core] locking/lockdep: Introduce
 CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK=y

Commit-ID:  e121d64e16484d4a5eba94cd2fa9eb3848b7c9c2
Gitweb:     https://git.kernel.org/tip/e121d64e16484d4a5eba94cd2fa9eb3848b7c9c2
Author:     Byungchul Park <byungchul.park@....com>
AuthorDate: Wed, 25 Oct 2017 17:56:02 +0900
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 25 Oct 2017 12:19:02 +0200

locking/lockdep: Introduce CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK=y

Add a Kconfig knob that enables the lockdep "crossrelease_fullstack" boot parameter.

Suggested-by: Ingo Molnar <mingo@...nel.org>
Signed-off-by: Byungchul Park <byungchul.park@....com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: amir73il@...il.com
Cc: axboe@...nel.dk
Cc: darrick.wong@...cle.com
Cc: david@...morbit.com
Cc: hch@...radead.org
Cc: idryomov@...il.com
Cc: johan@...nel.org
Cc: johannes.berg@...el.com
Cc: kernel-team@....com
Cc: linux-block@...r.kernel.org
Cc: linux-fsdevel@...r.kernel.org
Cc: linux-mm@...ck.org
Cc: linux-xfs@...r.kernel.org
Cc: oleg@...hat.com
Cc: tj@...nel.org
Link: http://lkml.kernel.org/r/1508921765-15396-7-git-send-email-byungchul.park@lge.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/locking/lockdep.c |  4 ++++
 lib/Kconfig.debug        | 15 +++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 160b5d6..db933d0 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -76,7 +76,11 @@ module_param(lock_stat, int, 0644);
 #define lock_stat 0
 #endif
 
+#ifdef CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
+static int crossrelease_fullstack = 1;
+#else
 static int crossrelease_fullstack;
+#endif
 static int __init allow_crossrelease_fullstack(char *str)
 {
 	crossrelease_fullstack = 1;
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c1e720a..2b439a5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1179,6 +1179,21 @@ config LOCKDEP_COMPLETIONS
 	 A deadlock caused by wait_for_completion() and complete() can be
 	 detected by lockdep using crossrelease feature.
 
+config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
+	bool "Enable the boot parameter, crossrelease_fullstack"
+	depends on LOCKDEP_CROSSRELEASE
+	default n
+	help
+	 The lockdep "cross-release" feature needs to record stack traces
+	 (of calling functions) for all acquisitions, for eventual later
+	 use during analysis. By default only a single caller is recorded,
+	 because the unwind operation can be very expensive with deeper
+	 stack chains.
+
+	 However a boot parameter, crossrelease_fullstack, was
+	 introduced since sometimes deeper traces are required for full
+	 analysis. This option turns on the boot parameter.
+
 config DEBUG_LOCKDEP
 	bool "Lock dependency engine debugging"
 	depends on DEBUG_KERNEL && LOCKDEP

Powered by blists - more mailing lists