kernel_optimize_test/kernel/kcsan
Marco Elver 48b1fc190a kcsan: Add option to allow watcher interruptions
Add option to allow interrupts while a watchpoint is set up. This can be
enabled either via CONFIG_KCSAN_INTERRUPT_WATCHER or via the boot
parameter 'kcsan.interrupt_watcher=1'.

Note that, currently not all safe per-CPU access primitives and patterns
are accounted for, which could result in false positives. For example,
asm-generic/percpu.h uses plain operations, which by default are
instrumented. On interrupts and subsequent accesses to the same
variable, KCSAN would currently report a data race with this option.

Therefore, this option should currently remain disabled by default, but
may be enabled for specific test scenarios.

To avoid new warnings, changes all uses of smp_processor_id() to use the
raw version (as already done in kcsan_found_watchpoint()). The exact SMP
processor id is for informational purposes in the report, and
correctness is not affected.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2020-03-25 09:55:59 -07:00
..
atomic.h kcsan: Prefer __always_inline for fast-path 2020-03-21 09:40:19 +01:00
core.c kcsan: Add option to allow watcher interruptions 2020-03-25 09:55:59 -07:00
debugfs.c kcsan: Introduce ASSERT_EXCLUSIVE_BITS(var, mask) 2020-03-21 09:44:14 +01:00
encoding.h kcsan: Prefer __always_inline for fast-path 2020-03-21 09:40:19 +01:00
kcsan.h kcsan: Add kcsan_set_access_mask() support 2020-03-21 09:44:08 +01:00
Makefile kcsan, trace: Make KCSAN compatible with tracing 2020-03-21 09:44:41 +01:00
report.c kcsan: Add kcsan_set_access_mask() support 2020-03-21 09:44:08 +01:00
test.c kcsan: Fix 0-sized checks 2020-03-21 09:42:42 +01:00