From patchwork Mon Nov 2 16:04:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11874417 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 C9A18C388F2 for ; Mon, 2 Nov 2020 16:18:40 +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 5166E222BA for ; Mon, 2 Nov 2020 16:18:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ml1fpZDr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="qPcFaq77" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5166E222BA 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=szRB10yLO1XjfzqvLjQ3m2Y4yGanjh200DCbEa55JGE=; b=Ml1fpZDrTlE3EMhPempNQLpUk wYBA+OL7pKub7GZDZP7MtEK/NHmmpDs3/60lDVidXcGGAiVGCcgh03qoImpBDzTzJaKcoGBW8mkje IFliymcc2lLCmwXoCfoTkvXX4L7r260W6UOcNsHpJzO6Zdag0CQ8F6FXfOZZqJOIfX15IZgq96D0J FF2pN13Tav77vJY/VZC52yY3xaJY7Fz9r5Merur53b20SzGihQhh2g36xr8X7oAz0IBCsIi67q/D6 WcU3B0Gl5TkyHazJQV4L0uY9mauxOoRwXGJRqqI4JTqFRGKZ9AP2oEw1sJVUOmNNxmdTXTB+oldmI ZIO+065Bg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZcWR-0004u6-GD; Mon, 02 Nov 2020 16:17:31 +0000 Received: from mail-wr1-x44a.google.com ([2a00:1450:4864:20::44a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZcL9-000707-Lx for linux-arm-kernel@lists.infradead.org; Mon, 02 Nov 2020 16:05:54 +0000 Received: by mail-wr1-x44a.google.com with SMTP id f11so6585213wro.15 for ; Mon, 02 Nov 2020 08:05:49 -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=NNmCWg3uUJkm97N9bODpJVOfWoCAwpfkACCfjKkMoC0=; b=qPcFaq777hgcZTn8yo7P5F27kww5oGhyVSMjBwDWyTz9uft51/+YlmhHlTg9S7hGV9 d8b0wvwV7HgGGYbBBF+UzG6xXIGdftNQsOe6rw6IrJtgsp9EVwCV/URLlBvOkk1AIaNy YChwpa3HVCcyS0b6aFarAJ/RSkc/zQa+sNebjqtfmGTTw0xy53wENFlCMAheQaaGdb9T cvjsSMFugF6SyvsfPEl42aBMAnt/JAiB9geaSTKxkef2XdTa+yJl/ZUmTGs4BDTO36E/ 1QlyL75W/QDPxiOkFTufsc1+SyAqNVAybEujDrd9vhWrHLfADL9mBLfJKI5VEttMLVrz BU8w== 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=NNmCWg3uUJkm97N9bODpJVOfWoCAwpfkACCfjKkMoC0=; b=jdZEgd7uLoA/OaY5Wo/5Hv2YQ2SEx2rVGqeBn3/wuWGtY9Cz8owx08SUMnwJkVl10A MP6UmSv3+fTEIcIC4waegk7vSn9FS3bh2jHRiRuuH35W51eBs/I4exAMejFBoOoMFl7i Hs+C8L+ewnwJQZ3btH+SzCECnz1p+FuG4SfVtLKYG+v3Yfn63yfO1iWIMdJs2QdtuAh+ FZSoxkdo54gr1XGviJRSTHjevIpvBwkg9ta/sstHDTpcRTOALJnUHkcVqMAVfBTC0u9S rq50kEGzuXz7wciYrKWm+46Si9WTPoi5PncolXn/DZyqTFLhyM4kl2wxBl97q0NAHHH6 OxEw== X-Gm-Message-State: AOAM5337cpHIzcp+R+feEev+ic7F/9J+XRNHSTyItMWyqpf1394Wx8tS AAFBJtfH6GU1sh3nDwXN7CEaqE4mysEU63z0 X-Google-Smtp-Source: ABdhPJxTZtMrOlRAcivtl/DfxDa2NTxs0uKOGlHNXMtACmGBEzGdVF5pCUR1iRnUEa0kJT9CCPiHdU6rMhOzZWEt X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a1c:b0ca:: with SMTP id z193mr18288765wme.82.1604333148905; Mon, 02 Nov 2020 08:05:48 -0800 (PST) Date: Mon, 2 Nov 2020 17:04:14 +0100 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog Subject: [PATCH v7 34/41] kasan, x86, s390: update undef CONFIG_KASAN From: Andrey Konovalov To: Catalin Marinas , Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201102_110551_889236_2DB7CDAB X-CRM114-Status: GOOD ( 13.27 ) 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 , Elena Petrova , Andrey Konovalov , Kevin Brodsky , 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 6d31f1b4c4d1..652decd6c4fc 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