From patchwork Tue Nov 10 22:10:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11895743 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 65C57C388F7 for ; Tue, 10 Nov 2020 22:42:02 +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 E0A9B206B6 for ; Tue, 10 Nov 2020 22:42:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZILSBEP1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="JmnoFjfR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="YvQ5Un7K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0A9B206B6 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=OhGy5g7xKdeH88iOS4gFPR7vwsmNe3kG2II4cMxClPc=; b=ZILSBEP1HydDJz7OPdJrwi4o9 qskf3fcZ3eYFoKUnrxKCIqVqyQTqYYJhqy8x4s3h6gQcK47xl8P7AJ6HvDH8cJixp4JLv5UBofedE OTrNPMIFi/Ig8BmqhKPratR+E37JofTD1jO8OvLyPruDds6xXzRIzj+GD/ATReO6cH6FnCD2PaDQ1 74DUrK5HpwuGyOY/035yvukrWRRR9pUfCZdicP4RkwJxvOuyIr6a4JBezCgtX17pcdEObguD7+Dm0 4RdSlxQ1iAtNLNQwz8x97owgRJqDiIdIRd6c0C7sxFLbPwXCHvpDzFpoUBXzEtuuUcbEkeMDSegro eknDtYHGw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kccKM-00015K-Bq; Tue, 10 Nov 2020 22:41:26 +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 1kccBF-0005D9-O1 for linux-arm-kernel@merlin.infradead.org; Tue, 10 Nov 2020 22:32:01 +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=7C8N6r4JJ4qY+cHK/gFnwxLkHzjgeTe7+92TE+0jPPs=; b=JmnoFjfRHhVWwuqx0rr2BeWEg/ sH5/7pYzct77GCFWnaCBUOqMukHhOiKkOMfnu/lBlSrK903tXcCfEqhT8cIRqeOOoiwWkWdQ/bh2U xMsFSEkBOH7C2Cmy3MF6kWjzFrLieGIEAF0gy4IC/YMsHpZAEv74M5ziqfCROnKYHG1ocy6Vo64Fj fhuZDaavfjnvv+PJophBmLY3SqP6F9xpgS4GOMIDZAoYIY5uJIwKhvJ1zbuMqFBhjb/C837MVpujK N6gfHK+A0K9S0rKZQr3HENho8/GgtEWLDz2DmUcLqnhjc/qyi9Zeu1Ch/SrlOJfwI+7eNzaZFPyZu cekYL17A==; 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 1kcbsS-0007h4-T7 for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 22:12:42 +0000 Received: by mail-wr1-x44a.google.com with SMTP id r16so6152541wrw.22 for ; Tue, 10 Nov 2020 14:12:36 -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=7C8N6r4JJ4qY+cHK/gFnwxLkHzjgeTe7+92TE+0jPPs=; b=YvQ5Un7KpgwmcezPEXaAUP8hpYtZyNCnEnOccFbaSYcbx6SJHu8KzzNajc5YOyA3cz HfiKVQkunx2vL46SoYIwE2SFC2+mVM6jOz2rTvjh9yY1FLTPCaGng24kSWY3H270SEA9 xHmYoS4XQl01JzqP20Emtv+NN3BxgG/NpTKeTR/PT9qcT3ZA6K2WCp6QEoXcS4L6eMoY TzTEjkcpUxQAOropERblscTf0Djg5pgNrCwoHKpnrOIOvQ0qTGGoFybOuu3vzwZob8Pk md8iuty1xuBKMfiIIAQvT6+QFQgIaU4dPEtcqdvIPTSXfkr+LKg693LdKhpKmom2HuWy clbg== 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=7C8N6r4JJ4qY+cHK/gFnwxLkHzjgeTe7+92TE+0jPPs=; b=lw6AzJrMvP6pScEHd3+V/5PME5EJ3WJ95biUxEeuxArq6mqdB5eMka+I5TXLac1Hlf 3EcR9tM59hgCl3sYcHnsgBWB97c84ivJm06MoLX5ixe+jcBKfXAH5VUV/mExqV/FUh3s q3Kg2/E3vn1r2nZR26EzFwyfvpNXBwUclbtm1ZE/25BMGycuQAvAbqu2i9UkE7CwFHG1 ubtjqPI9vCU2it05A6EPlW45ng7OkUDELWd1A/LpsiZ5BZ7iU08xTuA8V4IPhO2DbqCC REHuleLDx1ZUYSXGLhMl18dpkHcQ0XIKZSWCcR2K0YYwF4N8MCpMzA4+1af+JrD8u5qO EJdw== X-Gm-Message-State: AOAM532/9R+47ramQOVD2T+B7nwHXK4Mp5Va6VHjsQcqBY6JZSvGZP2g MqYroFeSn6gmd6w8BrQzukAKAyrBNF6ojqDB X-Google-Smtp-Source: ABdhPJzl5GsLF/tpsFk5OrVcRbgjl6qm9T5vyCu518DfRzeRWoShn0FhVtrtHn7ELb7tiDRniXsLP0B0mwAY+ryx X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a5d:634c:: with SMTP id b12mr10670704wrw.130.1605046354872; Tue, 10 Nov 2020 14:12:34 -0800 (PST) Date: Tue, 10 Nov 2020 23:10:34 +0100 In-Reply-To: Message-Id: <096906ff06c532bbd0e9bda53bcba2ba0a1da873.1605046192.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8-goog Subject: [PATCH v9 37/44] 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-20201110_221237_537315_4A0830E0 X-CRM114-Status: GOOD ( 12.14 ) 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 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