Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3409298pxx; Mon, 2 Nov 2020 08:09:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwORGK7FGRfMW8ETpBQIsbyRxt7QcLEljUq+6pj/J7gxc3HtR0n5R67HyjnB6NeaS11zp+R X-Received: by 2002:a17:906:c312:: with SMTP id s18mr11345009ejz.185.1604333342723; Mon, 02 Nov 2020 08:09:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604333342; cv=none; d=google.com; s=arc-20160816; b=G7SLqQd/NyZsRz+CEzlWA22ala17S6WJOGu0x5QVqxGt1024dPhmu8Ae5eaiVsJ2Ry h1aGqonPQrCignNfExFLLVlXdVamM1XSEsi669f0bGvOdy3SE7+321By0zdmR/YdEggM ihIhc2vZXaNyedNJjScgqJFhilbXyDe3I5tFXv46fSvN7Qs+a2gYnk+BVVHaeSkL0nht SrPqQIF2k8IGFZZACuGjOgh1igpI7j5LfTKmWktPzwoYMOE6zXnJ3UVpmlcKqWAjWjFq nybrvaQfQNUoon8se5dho61OVW+KCdyWK31cBvSpdCGix0FlCtfGeEEie3CfQlJU5wUF KD+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=NNmCWg3uUJkm97N9bODpJVOfWoCAwpfkACCfjKkMoC0=; b=n+8R0YVcdbzdv96o1yOLeEzd/Wd90L7mwWObK5dCd2ahnOgLmlstn4sdoBNjZdyGGY miiWR3yiHSzL0fxgrGVnmDkSfY/y8fjunX6Dj+69DOVVfoLMlz4p2P3ln7kfLQ5OirSv AEum5iHiKc6I6Kq42BpKPzcLqCcdDkCO6jZNrEbE+Hurp66qKxL0eyWj5jgxyOF+9uml FzlEmcXYd7FthR6/Kb8PfSCNSeDy2/7vDM2EWBc3ZxwRTwAfB3MPFDadKBCbaRd/KT5P Z0UBYqhXqDQjEHjIxsatsAE5xek+q68XXfaR9eYY4q8uFPQpz1REw3VZXz7XM/WQWdwq ZNeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qPcFaq77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si10305789ejh.16.2020.11.02.08.08.39; Mon, 02 Nov 2020 08:09:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qPcFaq77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbgKBQFy (ORCPT + 99 others); Mon, 2 Nov 2020 11:05:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727173AbgKBQFu (ORCPT ); Mon, 2 Nov 2020 11:05:50 -0500 Received: from mail-wr1-x44a.google.com (mail-wr1-x44a.google.com [IPv6:2a00:1450:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49659C0617A6 for ; Mon, 2 Nov 2020 08:05:50 -0800 (PST) Received: by mail-wr1-x44a.google.com with SMTP id 11so5508030wrc.3 for ; Mon, 02 Nov 2020 08:05:50 -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=dqMCiIU38vgSLeHcsTS8v3e6sTxwAb4xYN9p7CTHmfPR5q9R7aqdP4v/URkHX2rYg0 1SWAC0RwoBLlMynC4VvJZ4jTHqHv+POs6wCNrmkZxXfKHnrxt+DQEaxpMicXcoaYBhPz Mn7dSjzoFtBnpfYSZ1U9jpk8bi9w1FpbstCuaZC3SvkkgHPq2d9MzeL0HvahEoJpoFBk 22yS3MVyZ1r1191iI1yAT2QL3Fc1Bb32UHJfoaf+4q+LdqpnWChJIPmBpC2d27WNby8M FXCUvtT13/uBVOR36JgP+snDydPUZq8KNnmRtDpiTLi1GhuhE45Hks+4b3VoJvWFsgIt 2zuQ== X-Gm-Message-State: AOAM532W03g/r2dUkNU4YzxHmoPEdxng6+XUBPufRvdsDLTKfpVXHHqr aMlXMfSAF3uPyKxPnB/IicQLZZ/fSa7TdRH8 Sender: "andreyknvl via sendgmr" 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 Cc: Vincenzo Frascino , kasan-dev@googlegroups.com, Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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 -- 2.29.1.341.ge80a0c044ae-goog