Message ID | 20211214162050.660953-20-glider@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56E5EC433F5 for <linux-mm@archiver.kernel.org>; Tue, 14 Dec 2021 16:32:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3C2DF6B0095; Tue, 14 Dec 2021 11:22:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 372266B0096; Tue, 14 Dec 2021 11:22:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23A516B0098; Tue, 14 Dec 2021 11:22:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id 151726B0095 for <linux-mm@kvack.org>; Tue, 14 Dec 2021 11:22:58 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C71E0180DA19C for <linux-mm@kvack.org>; Tue, 14 Dec 2021 16:22:47 +0000 (UTC) X-FDA: 78916918374.15.B8EA9B6 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) by imf06.hostedemail.com (Postfix) with ESMTP id 99A4E180013 for <linux-mm@kvack.org>; Tue, 14 Dec 2021 16:22:46 +0000 (UTC) Received: by mail-wm1-f74.google.com with SMTP id n16-20020a05600c3b9000b003331973fdbbso8130362wms.0 for <linux-mm@kvack.org>; Tue, 14 Dec 2021 08:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=pDpFAq/kgLbL4mZTug/Zn/jZQvoibLkfmHC/vYYPKLY=; b=V6TLCTroMQ1YFeJUAuCxWCM8TfORF5zXzcc4ylqnnnUmQFBR0wkShjX3TJqpedLfoJ OhGXscqmWNGR3eRaLf8qdFbwlf3KhIX0EiqDRTN8sJuq8UUzEnWhnr5dTFLKiyXS6X2T sIPx9Sbr+F6MfZddMdDtG76pRYMoFyVl7xP2sc3dWOPGAIQl/vWIKp5uvz26MCsufIC8 D5t9esKWY42zFJ+INBQpNQr3Zq9zBsN5DOTYEB6P/fW2+gp6TbhSXY7HXXs2KYyuG8Wu 3Ad+I8gxvLI3sfzZkkglyYeUQ55b52BS6bBCkBjRSFvNDAzqQvwiBjzOqMH9VhpVlD8X kS7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=pDpFAq/kgLbL4mZTug/Zn/jZQvoibLkfmHC/vYYPKLY=; b=JLXfCJPHOMeGyXj1XkwlRaSsCFlAWzgxx6z8NiAJOdBcR4xa02QtBER/wKaa7cIpWc oa6V6smuDs908NoQTw+9sS0Ll0ghB/2zpCnzI5dGsIEWtHrIh86SHucWBBtYteyMESCP DS3Bb2BCqDhTxXEFuJCjXSX3J6uXqXM6dbnLPy3/0th21aHbh/kr9IL5a5qSzUKpI5IW g4+wZshbQIKYMjNeSLLJYl4jFeF0cwKMotdb8vVM7rawaJw2RsQT4An162F23p269fxj AFAhw7qY58RLm0+dKhaPkugWHYGjfRByncWL/ouo+4cCsay19WiaBh45XIxckF4m8W2y 8qHA== X-Gm-Message-State: AOAM5339txm/Cxd3TJsRf6rztWtKFzpxZYlzVwnEx5zR80YkyoQu0xyR waeI2hIT8/KTqM77yU0wvt7dUPW7JuI= X-Google-Smtp-Source: ABdhPJz5liaqc6HieOETlQr+PtYSR7daCRhoU6NJ7zV/jC4EZ7e8Cq5zAy4tyC1sowvOKbwx+OaMmBwZf9M= X-Received: from glider.muc.corp.google.com ([2a00:79e0:15:13:357e:2b9d:5b13:a652]) (user=glider job=sendgmr) by 2002:a05:600c:1d1b:: with SMTP id l27mr5819167wms.1.1639498965316; Tue, 14 Dec 2021 08:22:45 -0800 (PST) Date: Tue, 14 Dec 2021 17:20:26 +0100 In-Reply-To: <20211214162050.660953-1-glider@google.com> Message-Id: <20211214162050.660953-20-glider@google.com> Mime-Version: 1.0 References: <20211214162050.660953-1-glider@google.com> X-Mailer: git-send-email 2.34.1.173.g76aa8bc2d0-goog Subject: [PATCH 19/43] kmsan: init: call KMSAN initialization routines From: Alexander Potapenko <glider@google.com> To: glider@google.com Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Andrew Morton <akpm@linux-foundation.org>, Andrey Konovalov <andreyknvl@google.com>, Andy Lutomirski <luto@kernel.org>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Arnd Bergmann <arnd@arndb.de>, Borislav Petkov <bp@alien8.de>, Christoph Hellwig <hch@lst.de>, Christoph Lameter <cl@linux.com>, David Rientjes <rientjes@google.com>, Dmitry Vyukov <dvyukov@google.com>, Eric Dumazet <edumazet@google.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Herbert Xu <herbert@gondor.apana.org.au>, Ilya Leoshkevich <iii@linux.ibm.com>, Ingo Molnar <mingo@redhat.com>, Jens Axboe <axboe@kernel.dk>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Kees Cook <keescook@chromium.org>, Marco Elver <elver@google.com>, Matthew Wilcox <willy@infradead.org>, "Michael S. Tsirkin" <mst@redhat.com>, Pekka Enberg <penberg@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Petr Mladek <pmladek@suse.com>, Steven Rostedt <rostedt@goodmis.org>, Thomas Gleixner <tglx@linutronix.de>, Vasily Gorbik <gor@linux.ibm.com>, Vegard Nossum <vegard.nossum@oracle.com>, Vlastimil Babka <vbabka@suse.cz>, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 99A4E180013 X-Stat-Signature: 63qd8u9tyu3z5ou86cxnwh5ffse7e54s Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=V6TLCTro; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf06.hostedemail.com: domain of 31cS4YQYKCFY49612F4CC492.0CA96BIL-AA8Jy08.CF4@flex--glider.bounces.google.com designates 209.85.128.74 as permitted sender) smtp.mailfrom=31cS4YQYKCFY49612F4CC492.0CA96BIL-AA8Jy08.CF4@flex--glider.bounces.google.com X-Rspamd-Server: rspam11 X-HE-Tag: 1639498966-382255 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Add KernelMemorySanitizer infrastructure
|
expand
|
diff --git a/init/main.c b/init/main.c index bb984ed79de0e..2fc5025db0810 100644 --- a/init/main.c +++ b/init/main.c @@ -34,6 +34,7 @@ #include <linux/percpu.h> #include <linux/kmod.h> #include <linux/kprobes.h> +#include <linux/kmsan.h> #include <linux/vmalloc.h> #include <linux/kernel_stat.h> #include <linux/start_kernel.h> @@ -834,6 +835,7 @@ static void __init mm_init(void) init_mem_debugging_and_hardening(); kfence_alloc_pool(); report_meminit(); + kmsan_init_shadow(); stack_depot_init(); mem_init(); mem_init_print_info(); @@ -848,6 +850,7 @@ static void __init mm_init(void) init_espfix_bsp(); /* Should be run after espfix64 is set up. */ pti_init(); + kmsan_init_runtime(); } #ifdef CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
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@google.com> --- Link: https://linux-review.googlesource.com/id/I7bc53706141275914326df2345881ffe0cdd16bd --- init/main.c | 3 +++ 1 file changed, 3 insertions(+)