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: 11926623 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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 7A346C2D0E4 for ; Mon, 23 Nov 2020 20:24:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12578206E5 for ; Mon, 23 Nov 2020 20:24:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="2ydrhFqi"; 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 12578206E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hGCsTDK9lMXgscFiHpHrBeRJLs9vIbIWBmELdA3TMAI=; b=2ydrhFqic3EgJ1CoK0W+dfvDM 7N0v63ur3jp+z8vZDbbilcm6F0IuSu5EjnOjUXJXf3S4RfzyUNGXSow0kqUNdrtoKcs5w7SjEFXMi m2F4/KHAQZFMCV/Q6fibtU7Ld8wTw8c2UpwiZyGuaUDTqjj2CjEfw0ebVLtzuMAxA1B55oHlWio9D wGijerSgI9C7SObfF8k55JZobMGiX7I97Nx1a6b5ALeIZoaEh8eW61I/0O+9XCxnR2LS4zSc+Kasx raxdpHi9wJvDDoaPlOhvg6r7fppcK8tMvTF4v5dmcgiOHRnBwr2RzsiQKDA2TUCGWl2pQgGAw6cq3 BdlsVT0bA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khINY-000681-IC; Mon, 23 Nov 2020 20:24:04 +0000 Received: from mail-ed1-x54a.google.com ([2a00:1450:4864:20::54a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khI9s-0008RZ-DE for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2020 20:10:08 +0000 Received: by mail-ed1-x54a.google.com with SMTP id g25so2324230edu.21 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=cm0sBkgrb44ujtVDNpEDhm4ymBQyYOG/LvDy7eD0VxZXsNP+0HuOGh/d8VTIP0KEXf 1pUKVxWtS75keUq24zWDFCGGoyyysiOlB3bspd8LGhQ24b59voFJYGpyGdSxpbkTc7vL qUmsILJwPmpbsNhGTyvbC8XAhad5Nhjs5QvV2qPpGTa6k1qE0I7faekm63MqR3RDTcJW vP2mAbVGJVurfpQLkIqsrwzq1DA1KLLcOLejIzQF4QFuMLQ7MDKgIY7Vr+gQQifXndhj x+O0yfhHeHKns/jqHezMmA+Dd6INFYJF75nj8OU08wq0N0xVUMTHKTKL7S5An7Oziq47 gTpQ== X-Gm-Message-State: AOAM531ZomePMThu3A3/KdUN+jj3mY2IgmvS74dfM+GNpA8SfqfwmQI+ HWmaq7nOIRYyWsBaitv4lLNpiOxHWTUOlkdi 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201123_150956_620559_8E8E4424 X-CRM114-Status: GOOD ( 13.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Marco Elver , Vasily Gorbik , Catalin Marinas , Kevin Brodsky , Will Deacon , Branislav Rankov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Potapenko , Evgenii Stepanov , Andrey Konovalov , Andrey Ryabinin , Vincenzo Frascino , Dmitry Vyukov Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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