diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/init_task.c | 10 | ||||
-rw-r--r-- | init/main.c | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/init/init_task.c b/init/init_task.c index a90ac70cc515..15089d15010a 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -174,6 +174,16 @@ 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, + .access_mask = 0, + .scoped_accesses = {LIST_POISON1, NULL}, + }, +#endif #ifdef CONFIG_TRACE_IRQFLAGS .softirqs_enabled = 1, #endif diff --git a/init/main.c b/init/main.c index b59e09353881..0ead83e86b5a 100644 --- a/init/main.c +++ b/init/main.c @@ -95,6 +95,7 @@ #include <linux/rodata_test.h> #include <linux/jump_label.h> #include <linux/mem_encrypt.h> +#include <linux/kcsan.h> #include <asm/io.h> #include <asm/bugs.h> @@ -1036,6 +1037,7 @@ asmlinkage __visible void __init start_kernel(void) acpi_subsystem_init(); arch_post_acpi_subsys_init(); sfi_init_late(); + kcsan_init(); /* Do the rest non-__init'ed, we're now alive */ arch_call_rest_init(); |