From patchwork Wed Nov 4 23:18:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11883143 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=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 3533CC00A89 for ; Thu, 5 Nov 2020 04:29:53 +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 6E51620825 for ; Thu, 5 Nov 2020 04:29: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="NKb+9J01"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="jsGorweo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="OANIlywW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E51620825 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=8fXeLdOoeqx7NrFnnX9U3bZ8W/6D9lZEigObPnQcsV0=; b=NKb+9J01eIwuAWS88YfZDjwl1 n3J6+quZCPpy3ZGn5gkDJkKQHNVVzr3vjVmzqwbnDwKE0tJSLkMy0Gd/PokkQe0JxoRQAoRn10f2M 7DwH4e1lUgqVCIqqncycVhkJiSmGS+3OoQnuhFh7ix1DVMXoLP18TSmpE9h7s+kLiJb+LSxoOflyo /Y0QLAQfmzGte3jvxOUecCTv9pWPc0270kxoB4kYJCYKsSIvq0nbEMxNRda5cWYhiiahTgFuyFrg2 CrcSdlG4QtqlfbPBC4ysv+axzOSJdBymlc1ImdtAff5TvYJj7WyslD89Kq7Tit2dKmMsiN1xgJqb8 1lUGGMz8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaWsN-0000RT-80; Thu, 05 Nov 2020 04:27:55 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaW55-000145-Ni for linux-arm-kernel@merlin.infradead.org; Thu, 05 Nov 2020 03:36:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:Cc:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7ejNZAMa5/1JIms2ONCukWsDh69PgCTWliqLjQNgQ+A=; b=jsGorweo13FJtgXG2V3nemhEE8 5e2eceq1bHa2LhW44uE/uTzXMgCWyiT01531kCMFho94GIFJ+l3mpwX0NNk/33R3CIL49mj4hNqCT xHnVX1NaYbDvmUqs2K5glNUTtlwggpEEwkpo84GT5TrLQaB7VAidgUJhQIxKwOnN/NysC2FZ4NEv5 d5BKFq7Zvu8M7EC5UM0lzOBDv4aqsKd2Hm33+5gV3sA+1D5DW4tG5sZfA3iSYGF6m4oP8jrs87aNo sFntHwC30WtN1TYFELJXRascxSnXrQ2L8YZRf9eXKntMHf3zKAtR36ILDJr4zB0CaJ50z248zPZ6y YQrueeMg==; Received: from mail-wr1-x44a.google.com ([2a00:1450:4864:20::44a]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaS5v-0004Ar-CU for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2020 23:21:37 +0000 Received: by mail-wr1-x44a.google.com with SMTP id i1so35985wrb.18 for ; Wed, 04 Nov 2020 15:21:35 -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=7ejNZAMa5/1JIms2ONCukWsDh69PgCTWliqLjQNgQ+A=; b=OANIlywW0h+etUqkMvJcuxZ3OuQuc0FWR+2EY7sDDa2J4qYPs/EOi2qPBH5yWF/4h4 MDg7mZ+2i/a0GONk70Rod9wKNyIzgKbv0SwcpyA2jnHPIyGVP0NaXFpp9d4w3Of3ZOJ+ Ond0JaaMErwVbx8ixmBT907DBmgt85JJ2j3lnA++zynBfLtWZmhEK8EPP4ocJ7MXmO3W iKz7NrpJqkT75IuVLBvdPnlQ63Uw/NyRITsvGVA9bj9/hPp06xNJ+jW5APlMYBuiP5WO 3SfTsodwzUsVxmj0wgEdveNsYGIqHcMKjW6wxkcJvlvyXbHZf4dDUWPEF2LQ/KHORxn2 cZIA== 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=7ejNZAMa5/1JIms2ONCukWsDh69PgCTWliqLjQNgQ+A=; b=CQ/C9H6XRD+e3JbfcvA76m0VW/CWU0WQc9T3FsNkSVuebWnOplBlY8biFHNmDGiWUU EBYgydFovXEWkl2cZrOm/H6M6ggy+IOMzLLTtrih9+wvb6rFfHDWfG0p/1t7ZnJ+CBAM EUv8T3wSXWKSNooaw3arQthLWXeCyF6n7C2axckt0IOifoyl77VrjEDjDgFhEG6GmupV YETdAA7FU1qAYUkYKtF85gzGyz6PUxVkZPsxm+Z1hBOIvIcio54I3ZEfK7ohfS/0ViuE SsKq1tXojQTMuLmYPn5SEuftEex385c/9V8FnlUlI+m8B/u5iB8OzKzG6Edmkdx2EMYa GY7g== X-Gm-Message-State: AOAM531E+B9fBtnajCbJvSm3L4wUmmNQP3i0mYlXhH0jua0JbVdReHgb c6plZLtmkjiUvc9IT7vjwoqxI67HB7pM0y3v X-Google-Smtp-Source: ABdhPJxt5Cgh2slN/TZHFEWjdksv3wvZX7iIDYDfj3fp74hQ3jBFqoeSWK+4bs4wFYhCSdoLLTba1d510zbvrN3B X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a05:600c:2252:: with SMTP id a18mr46162wmm.139.1604532033584; Wed, 04 Nov 2020 15:20:33 -0800 (PST) Date: Thu, 5 Nov 2020 00:18:51 +0100 In-Reply-To: Message-Id: <610e97ebe0d46531ca2c988ebb26dd04d08d96c2.1604531793.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog Subject: [PATCH v8 36/43] kasan, x86, s390: update undef CONFIG_KASAN From: Andrey Konovalov To: Catalin Marinas X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_232135_595665_3C346AA6 X-CRM114-Status: GOOD ( 11.99 ) 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 , Andrey Konovalov , Kevin Brodsky , Will Deacon , Branislav Rankov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Potapenko , Evgenii Stepanov , Andrey Ryabinin , Andrew Morton , 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 --- 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