diff options
| author | Marco Elver <[email protected]> | 2019-11-14 18:02:54 +0000 |
|---|---|---|
| committer | Paul E. McKenney <[email protected]> | 2019-11-16 15:23:13 +0000 |
| commit | dfd402a4c4baae42398ce9180ff424d589b8bffc (patch) | |
| tree | e628a40284725614b915478123302ed0371523e4 /init/init_task.c | |
| parent | Linux 5.4-rc7 (diff) | |
| download | kernel-dfd402a4c4baae42398ce9180ff424d589b8bffc.tar.gz kernel-dfd402a4c4baae42398ce9180ff424d589b8bffc.zip | |
kcsan: Add Kernel Concurrency Sanitizer infrastructure
Kernel Concurrency Sanitizer (KCSAN) is a dynamic data-race detector for
kernel space. KCSAN is a sampling watchpoint-based data-race detector.
See the included Documentation/dev-tools/kcsan.rst for more details.
This patch adds basic infrastructure, but does not yet enable KCSAN for
any architecture.
Signed-off-by: Marco Elver <[email protected]>
Acked-by: Paul E. McKenney <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Diffstat (limited to 'init/init_task.c')
| -rw-r--r-- | init/init_task.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/init/init_task.c b/init/init_task.c index 9e5cbe5eab7b..2b4fe98b0f09 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -161,6 +161,14 @@ struct task_struct init_task #ifdef CONFIG_KASAN .kasan_depth = 1, #endif +#ifdef CONFIG_KCSAN + .kcsan_ctx = { + .disable_count = 0, + .atomic_next = 0, + .atomic_nest_count = 0, + .in_flat_atomic = false, + }, +#endif #ifdef CONFIG_TRACE_IRQFLAGS .softirqs_enabled = 1, #endif |
