summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-05-08 14:58:28 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-05-08 14:58:28 +0200
commit97a9474aeb789183a1d0712e66a4283860279ac9 (patch)
tree4cd94285ef4a8e81c8d2e28f7dc9923cb60014e4 /lib
parentMerge tag 'v5.7-rc1' into locking/kcsan, to resolve conflicts and refresh (diff)
parentobjtool, kcsan: Add kcsan_disable_current() and kcsan_enable_current_nowarn() (diff)
downloadlinux-97a9474aeb789183a1d0712e66a4283860279ac9.tar.xz
linux-97a9474aeb789183a1d0712e66a4283860279ac9.zip
Merge branch 'kcsan-for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/kcsan
Pull KCSAN updates from Paul McKenney.
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.kcsan39
1 files changed, 32 insertions, 7 deletions
diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
index f0b791143c6a..689b6b81f272 100644
--- a/lib/Kconfig.kcsan
+++ b/lib/Kconfig.kcsan
@@ -4,22 +4,36 @@ config HAVE_ARCH_KCSAN
bool
menuconfig KCSAN
- bool "KCSAN: dynamic race detector"
+ bool "KCSAN: dynamic data race detector"
depends on HAVE_ARCH_KCSAN && DEBUG_KERNEL && !KASAN
select STACKTRACE
help
- The Kernel Concurrency Sanitizer (KCSAN) is a dynamic race detector,
- which relies on compile-time instrumentation, and uses a
- watchpoint-based sampling approach to detect races.
+ The Kernel Concurrency Sanitizer (KCSAN) is a dynamic
+ data-race detector that relies on compile-time instrumentation.
+ KCSAN uses a watchpoint-based sampling approach to detect races.
- KCSAN's primary purpose is to detect data races. KCSAN can also be
- used to check properties, with the help of provided assertions, of
- concurrent code where bugs do not manifest as data races.
+ While KCSAN's primary purpose is to detect data races, it
+ also provides assertions to check data access constraints.
+ These assertions can expose bugs that do not manifest as
+ data races.
See <file:Documentation/dev-tools/kcsan.rst> for more details.
if KCSAN
+config KCSAN_VERBOSE
+ bool "Show verbose reports with more information about system state"
+ depends on PROVE_LOCKING
+ help
+ If enabled, reports show more information about the system state that
+ may help better analyze and debug races. This includes held locks and
+ IRQ trace events.
+
+ While this option should generally be benign, we call into more
+ external functions on report generation; if a race report is
+ generated from any one of them, system stability may suffer due to
+ deadlocks or recursion. If in doubt, say N.
+
config KCSAN_DEBUG
bool "Debugging of KCSAN internals"
@@ -88,6 +102,17 @@ config KCSAN_SKIP_WATCH_RANDOMIZE
KCSAN_WATCH_SKIP. If false, the chosen value is always
KCSAN_WATCH_SKIP.
+config KCSAN_INTERRUPT_WATCHER
+ bool "Interruptible watchers"
+ help
+ If enabled, a task that set up a watchpoint may be interrupted while
+ delayed. This option will allow KCSAN to detect races between
+ interrupted tasks and other threads of execution on the same CPU.
+
+ Currently disabled by default, because not all safe per-CPU access
+ primitives and patterns may be accounted for, and therefore could
+ result in false positives.
+
config KCSAN_REPORT_ONCE_IN_MS
int "Duration in milliseconds, in which any given race is only reported once"
default 3000