[tip: locking/debug] kcsan: Remove CONFIG_KCSAN_DEBUG

From: tip-bot2 for Marco Elver
Date: Wed Aug 18 2021 - 03:59:39 EST

The following commit has been merged into the locking/debug branch of tip:

Commit-ID: a7a73697360ea81244eea550138b8f614348860c
Gitweb: https://git.kernel.org/tip/a7a73697360ea81244eea550138b8f614348860c
Author: Marco Elver <elver@xxxxxxxxxx>
AuthorDate: Mon, 07 Jun 2021 14:56:48 +02:00
Committer: Paul E. McKenney <paulmck@xxxxxxxxxx>
CommitterDate: Tue, 20 Jul 2021 13:49:43 -07:00


By this point CONFIG_KCSAN_DEBUG is pretty useless, as the system just
isn't usable with it due to spamming console (I imagine a randconfig
test robot will run into this sooner or later). Remove it.

Back in 2019 I used it occasionally to record traces of watchpoints and
verify the encoding is correct, but these days we have proper tests. If
something similar is needed in future, just add it back ad-hoc.

Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
Acked-by: Mark Rutland <mark.rutland@xxxxxxx>
Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
kernel/kcsan/core.c | 9 ---------
lib/Kconfig.kcsan | 3 ---
2 files changed, 12 deletions(-)

diff --git a/kernel/kcsan/core.c b/kernel/kcsan/core.c
index 26709ea..d92977e 100644
--- a/kernel/kcsan/core.c
+++ b/kernel/kcsan/core.c
@@ -479,15 +479,6 @@ kcsan_setup_watchpoint(const volatile void *ptr, size_t size, int type)
break; /* ignore; we do not diff the values */

- kcsan_disable_current();
- pr_err("watching %s, size: %zu, addr: %px [slot: %d, encoded: %lx]\n",
- is_write ? "write" : "read", size, ptr,
- watchpoint_slot((unsigned long)ptr),
- encode_watchpoint((unsigned long)ptr, size, is_write));
- kcsan_enable_current();
- }
* Delay this thread, to increase probability of observing a racy
* conflicting access.
diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
index 6152fbd..5304f21 100644
--- a/lib/Kconfig.kcsan
+++ b/lib/Kconfig.kcsan
@@ -62,9 +62,6 @@ config KCSAN_VERBOSE
generated from any one of them, system stability may suffer due to
deadlocks or recursion. If in doubt, say N.

- bool "Debugging of KCSAN internals"
bool "Perform short selftests on boot"
default y