kmsan_initialize_shadow() creates metadata pages for mappings created at boot time. kmsan_initialize() initializes the bookkeeping for init_task and enables KMSAN. Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx> To: Alexander Potapenko <glider@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Andy Lutomirski <luto@xxxxxxxxxx> Cc: Vegard Nossum <vegard.nossum@xxxxxxxxxx> Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx> Cc: Andrey Konovalov <andreyknvl@xxxxxxxxxx> Cc: Marco Elver <elver@xxxxxxxxxx> Cc: linux-mm@xxxxxxxxx --- Change-Id: Ie3af251d629b911668f8651d868c544f3c11209f --- init/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init/main.c b/init/main.c index 91f6ebb30ef0..afcca2a38348 100644 --- a/init/main.c +++ b/init/main.c @@ -32,6 +32,7 @@ #include <linux/nmi.h> #include <linux/percpu.h> #include <linux/kmod.h> +#include <linux/kmsan.h> #include <linux/vmalloc.h> #include <linux/kernel_stat.h> #include <linux/start_kernel.h> @@ -554,6 +555,7 @@ static void __init mm_init(void) */ page_ext_init_flatmem(); report_meminit(); + kmsan_initialize_shadow(); mem_init(); kmem_cache_init(); kmemleak_init(); @@ -625,6 +627,7 @@ asmlinkage __visible void __init start_kernel(void) sort_main_extable(); trap_init(); mm_init(); + kmsan_initialize(); ftrace_init(); -- 2.24.1.735.g03f4e72817-goog