From patchwork Wed Mar 25 16:12:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Potapenko X-Patchwork-Id: 11458287 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D68D76CA for ; Wed, 25 Mar 2020 16:14:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 99E5F20409 for ; Wed, 25 Mar 2020 16:14:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="uFOU7nF0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99E5F20409 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E33706B00A2; Wed, 25 Mar 2020 12:14:26 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DBFAA6B00A4; Wed, 25 Mar 2020 12:14:26 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C36926B00A5; Wed, 25 Mar 2020 12:14:26 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0180.hostedemail.com [216.40.44.180]) by kanga.kvack.org (Postfix) with ESMTP id 981506B00A2 for ; Wed, 25 Mar 2020 12:14:26 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 726811801F2CF for ; Wed, 25 Mar 2020 16:14:26 +0000 (UTC) X-FDA: 76634382132.17.cat10_7e0dd3bed231c X-Spam-Summary: 2,0,0,115ccab85b4b0435,d41d8cd98f00b204,3yin7xgykce8x2zuv8x55x2v.t532z4be-331crt1.58x@flex--glider.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1260:1277:1313:1314:1345:1359:1431:1437:1516:1518:1535:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3152:3352:3865:3867:3868:5007:6261:6653:6742:6743:9969:10004:10400:11026:11232:11658:11914:12043:12048:12296:12297:12438:12555:12895:13069:13311:13357:13846:14096:14097:14181:14394:14659:14721:21080:21212:21365:21444:21451:21627:30054:30064,0,RBL:209.85.221.73:@flex--glider.bounces.google.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: cat10_7e0dd3bed231c X-Filterd-Recvd-Size: 5008 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Mar 2020 16:14:26 +0000 (UTC) Received: by mail-wr1-f73.google.com with SMTP id v14so1367202wrq.13 for ; Wed, 25 Mar 2020 09:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=gyq7hwN+bisRArIjD7Jqw5eHSbpVolCsZs6kktVM9HU=; b=uFOU7nF0gUAz/Oy62ihGODUkDhlkGwot5Cd5M65DG6hGMt+rVq0TGgEW+XJsmRP5KT wV9k3Qn8gt2Zahyidlnk9L3iI1BE+61P0BWlidR0+tfKHQEqJJOs4InrfZNvjSl88o0N 37uTduGFYmz2n61cDL99062tECcJj3gtZWYC8I73RS/J+w30oE4eKe33umcRl3I5pQyZ Me5rTodffpR3ByfOYB8C7O1ERhppkWhZyBcN3icpAoYHwbbGG4s01obW81D8/FwRJ5WK xd48tSQ9GpXB1KCWqzSRLXJlBOTF8kPXBZV/j4TQHfYeb6fUpDh+09B6nB0r/lapNvfR ew7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=gyq7hwN+bisRArIjD7Jqw5eHSbpVolCsZs6kktVM9HU=; b=CLgnPD3IwktswVa9NdZ62Co72BjT3aCJLaZkT6CUGP32auPRMkYxs7lr9sKdu8yKo8 wCqSm8Ksj6DzHNeqW9zVlOss0fydxDpDo5jyK5iKB8g3eAEUOU7ZDZoXAP6BIYpIg6BN tcSJaEZScoXsihviXxqLQfpS6YE0vaHVQUt8TZll4eKBfHztTey4mcnb77/XUW7hr8mG csdpJ9bWLRwfEg4oVWW+r7tkyHczHDNVEE+dxEh1cH2y2Oqzng4GGevpy5Frz8WiZ7Os YQABj4Vc8BhQDCrvVWpkU2nW5+YntTNYZ5erGluJD8AiTsck1/COM/c/aYPVKuxTkrOz 667Q== X-Gm-Message-State: ANhLgQ3TpTirtSNOrs9RebCy31VSiNM4Xeg0feC5mRetopeCUpmB1nkd yN+A3gAJZV/xv1bLlM6zlI9RpwNXgSk= X-Google-Smtp-Source: ADFU+vs0XM59oG2kZqEzxFrE548WfVgevMAAgSa86uIo0PXQ2wuZ3TP7TmdvlcyJQT5QV0byWMHSbehogio= X-Received: by 2002:adf:edcf:: with SMTP id v15mr4132316wro.309.1585152864527; Wed, 25 Mar 2020 09:14:24 -0700 (PDT) Date: Wed, 25 Mar 2020 17:12:39 +0100 In-Reply-To: <20200325161249.55095-1-glider@google.com> Message-Id: <20200325161249.55095-29-glider@google.com> Mime-Version: 1.0 References: <20200325161249.55095-1-glider@google.com> X-Mailer: git-send-email 2.25.1.696.g5e7596f4ac-goog Subject: [PATCH v5 28/38] kmsan: init: call KMSAN initialization routines From: glider@google.com To: Jens Axboe , Andy Lutomirski , Vegard Nossum , Dmitry Vyukov , Andrey Konovalov , Marco Elver , linux-mm@kvack.org Cc: glider@google.com, viro@zeniv.linux.org.uk, adilger.kernel@dilger.ca, akpm@linux-foundation.org, aryabinin@virtuozzo.com, ard.biesheuvel@linaro.org, arnd@arndb.de, hch@infradead.org, hch@lst.de, darrick.wong@oracle.com, davem@davemloft.net, dmitry.torokhov@gmail.com, ebiggers@google.com, edumazet@google.com, ericvh@gmail.com, gregkh@linuxfoundation.org, harry.wentland@amd.com, herbert@gondor.apana.org.au, iii@linux.ibm.com, mingo@elte.hu, jasowang@redhat.com, m.szyprowski@samsung.com, mark.rutland@arm.com, martin.petersen@oracle.com, schwidefsky@de.ibm.com, willy@infradead.org, mst@redhat.com, mhocko@suse.com, monstr@monstr.eu, pmladek@suse.com, cai@lca.pw, rdunlap@infradead.org, robin.murphy@arm.com, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, tiwai@suse.com, tytso@mit.edu, tglx@linutronix.de, gor@linux.ibm.com, wsa@the-dreams.de 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: 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 To: Alexander Potapenko Cc: Jens Axboe Cc: Andy Lutomirski Cc: Vegard Nossum Cc: Dmitry Vyukov Cc: Andrey Konovalov Cc: Marco Elver Cc: linux-mm@kvack.org Reviewed-by: Andrey Konovalov --- Change-Id: Ie3af251d629b911668f8651d868c544f3c11209f --- init/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init/main.c b/init/main.c index 345a9ab4450f1..4dd15063d32fe 100644 --- a/init/main.c +++ b/init/main.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -772,6 +773,7 @@ static void __init mm_init(void) page_ext_init_flatmem(); init_debug_pagealloc(); report_meminit(); + kmsan_initialize_shadow(); mem_init(); kmem_cache_init(); kmemleak_init(); @@ -847,6 +849,7 @@ asmlinkage __visible void __init start_kernel(void) sort_main_extable(); trap_init(); mm_init(); + kmsan_initialize(); ftrace_init();