From patchwork Mon Nov 23 20:07:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11926427 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EC58C63697 for ; Mon, 23 Nov 2020 20:09:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C19520717 for ; Mon, 23 Nov 2020 20:09:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="S901JV6O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C19520717 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 130B56B00BD; Mon, 23 Nov 2020 15:09:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 06C886B00BE; Mon, 23 Nov 2020 15:09:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E27DA6B00BF; Mon, 23 Nov 2020 15:09:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0218.hostedemail.com [216.40.44.218]) by kanga.kvack.org (Postfix) with ESMTP id 9B33F6B00BD for ; Mon, 23 Nov 2020 15:09:52 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 46C1A1EE6 for ; Mon, 23 Nov 2020 20:09:52 +0000 (UTC) X-FDA: 77516773824.05.snow66_060298a27368 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 20C5618016BDF for ; Mon, 23 Nov 2020 20:09:52 +0000 (UTC) X-HE-Tag: snow66_060298a27368 X-Filterd-Recvd-Size: 5079 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Nov 2020 20:09:51 +0000 (UTC) Received: by mail-ej1-f73.google.com with SMTP id 2so6083850ejv.4 for ; Mon, 23 Nov 2020 12:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=rfxkb1rbWhlJP1u/zeppHvBMeszJmW3VoX+v06hDfPQ=; b=S901JV6OYv0DZw1mRU118ANFvXmzWoHSDPEmWrI6jzezugG3fwVLpz2mHCft2nxRtP EI2eUSJ3x1IU4k0OV3hutp956T65HeL8BBatSiHQMHfJQWjUDK8bvoOm1OrtNMO7uQxw XtvdlJ3+5yv+QYS7x7jaIAc1n0cqHMb1iFQktJ+VYW6aQNM3xpKnciG27mJ42MGeL8zL 4oco0b6imy4Xv7aOQ72vo/UyvC31zc+f2u155Dzz88zZ+FNMlf0F2blDqd6nJa0EJ3KO vJgx0Vx7C/TH4I+y1+cOY1w4u6ZRPlwsibSqX0nqnAsCh6+9B4tgebFi/sjwVLwWRsOH 3D5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=rfxkb1rbWhlJP1u/zeppHvBMeszJmW3VoX+v06hDfPQ=; b=JkNEOaXs42kCXxfTZmQH1eDdyUXTZFheyjFMV1NZaWiQNcgZOHQk7fmCt7dHaUFdbj w0p8AZqAo62l5l/MsXcgYMNUSVtUDaiHY2GwmaVfoasTvtdE4yRgLGYo31CPhi0oxNsC P65VVCeY2r/Y3iP/IVMBAJXphvLXym57AVHy0PIC8WAu7owogLKit+Exzii36GzIg0sk NR++r5BFLl3e4zQI7ikY5s2H+2jR5p6cFxWXMQy/6ixolqgvJi2B1AfTXUfW0/K3E1Go hbDJNxqaHryTlRAi07Bd/MsLCdb1tKyOs5SxT6FCCQUL7qg2Wnc7ma6JVHxWiO46/3FG aXfw== X-Gm-Message-State: AOAM530fgWpwB5PBfBN++HrF947nAocZymoQE8TCCq/SJe/iWzCuEUKT LUPTdyU4hncQV+9us11kQ2NPVISVSEQJhSYp X-Google-Smtp-Source: ABdhPJwCl3N4O1o+4xYsupCVtEdYknPpNvWd01pn7sNTrxrPEx3Sbcne4XR5ESpGoEVMUbTQU5mzs7X0t0Tx2Qg6 X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a17:906:c0d1:: with SMTP id bn17mr1284452ejb.114.1606162189982; Mon, 23 Nov 2020 12:09:49 -0800 (PST) Date: Mon, 23 Nov 2020 21:07:59 +0100 In-Reply-To: Message-Id: <9d84bfaaf8fabe0fc89f913c9e420a30bd31a260.1606161801.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [PATCH mm v11 35/42] kasan, x86, s390: update undef CONFIG_KASAN From: Andrey Konovalov To: Andrew Morton Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov , Vasily Gorbik 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: With the intoduction of hardware tag-based KASAN some kernel checks of this kind: ifdef CONFIG_KASAN will be updated to: if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS) x86 and s390 use a trick to #undef CONFIG_KASAN for some of the code that isn't linked with KASAN runtime and shouldn't have any KASAN annotations. Also #undef CONFIG_KASAN_GENERIC with CONFIG_KASAN. Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Acked-by: Vasily Gorbik Reviewed-by: Alexander Potapenko --- Change-Id: I2a622db0cb86a8feb60c30d8cb09190075be2a90 --- arch/s390/boot/string.c | 1 + arch/x86/boot/compressed/misc.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/s390/boot/string.c b/arch/s390/boot/string.c index b11e8108773a..faccb33b462c 100644 --- a/arch/s390/boot/string.c +++ b/arch/s390/boot/string.c @@ -3,6 +3,7 @@ #include #include #undef CONFIG_KASAN +#undef CONFIG_KASAN_GENERIC #include "../lib/string.c" int strncmp(const char *cs, const char *ct, size_t count) diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index d9a631c5973c..901ea5ebec22 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -12,6 +12,7 @@ #undef CONFIG_PARAVIRT_XXL #undef CONFIG_PARAVIRT_SPINLOCKS #undef CONFIG_KASAN +#undef CONFIG_KASAN_GENERIC /* cpu_feature_enabled() cannot be used this early */ #define USE_EARLY_PGTABLE_L5