Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1507099pxb; Wed, 4 Nov 2020 10:45:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqibTU5Ga4/jFm/qcp4pCQhcqMwZQ9878enSnTt+S0m9/p4cOobjPJblcY4OENOwRjy8wd X-Received: by 2002:a05:6402:21c7:: with SMTP id bi7mr13482510edb.54.1604515542934; Wed, 04 Nov 2020 10:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604515542; cv=none; d=google.com; s=arc-20160816; b=Z8D3NKqTNIjoAZ8gfHkDnCjV+sRNT9QbGoz9ABUBnQZqkXB4YaKZ9PIVe1eDRHwspH LfULZ90R2KCBN+CgQQBOJWXnpIlySQWsIw6FlyDmB08XpyK6LCt/5SXId6njxqhuzWPw yK7X/Gn98IMRwcGcEj9f4dXfDXuHbEC0ym09jEzxwd9dNGgHRqVgLBQVeTCuQvFIJxPf KeOKyAZRCpi5ovvguxHW3kJmjkWoe+Y9jqd/gsvj2MhiyN6hOWbr90kLtIFCQ+V5Vkmo nJtClJHx4gL/gRTdr+4mb/+ideYBMygayWMPPOLwRCvNaJ/4DDZ3fM2TB4jeF/z8mfu1 Hl7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oobUaTCyncltoWrqEBGvrcm3OQzVhlM1as7YFTDZv1Q=; b=R7cSw3jC23XRj0qUfDmX0Z5nIycMAUSV8cuUJPjczHq8U5Gcp+E6hoNRWDpcRLlqiN +lzAG+s5B+HJ0605nzANJ962kSwUUsmSJxfAbESV6eC0LcJ6UsGNcLKbC0qkSHnUehzR aDfZC19zFM+KEar9uYdcXt1XEg22nF/jSzp5oJ7rsi0DkWP1oNIclaDMhwyAEeSNltuN pv+RH46dCMljH8+zGhCBD/YOowiMQj5ekS+VhJfDGaGUccQ7eXAqP+Qihn8VVXXAvvmt Q2duF1mfxMQZONaTAM8aCZMLA5FuaKmFIJt1yB4CEgKNhkRK+I8B1sa2cwaxBFU2AwR/ fLzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=e94ed6x5; 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 m20si1866510ejc.60.2020.11.04.10.45.19; Wed, 04 Nov 2020 10:45:42 -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=e94ed6x5; 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 S1730895AbgKDR2d (ORCPT + 99 others); Wed, 4 Nov 2020 12:28:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729902AbgKDR2d (ORCPT ); Wed, 4 Nov 2020 12:28:33 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6C2AC0613D3 for ; Wed, 4 Nov 2020 09:28:32 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id k7so1317273plk.3 for ; Wed, 04 Nov 2020 09:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oobUaTCyncltoWrqEBGvrcm3OQzVhlM1as7YFTDZv1Q=; b=e94ed6x5FCwfZrmS8PN4dn1hnU5uLg30jw+fTQ5DvLYollVJh/Gi7Psnh6Awqglp6p C1moH7tNn9ZDwXNnYDpwQaOzg14pxZvZGNrge9I0uTnaCurNlIpg9+fubCfCmA2AF/DB x8nGAdRQ9tHjxBc0Oa/IIf/tsWuZ35HPe0pXZxqAfyYie0qxgGs2zQdUZnkHT9Rg2NSE c5yBrcU98xFJPgsVfYk7veyhLYxZN1WJGnCUnInsRHniArJ6Hj8f2S7iPNeKRTkYMKCi bvSK14kDTO10McxP9PWrQVLBN8UF6QR7Uh3npigRda3iWbXsEMA3BV2Ppyn2BaywLE13 iZZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oobUaTCyncltoWrqEBGvrcm3OQzVhlM1as7YFTDZv1Q=; b=Gk41GhTM53glquP1xiwDRiCAnXaXtmVSO+omRzqXC/uopT0izRU0zzX/Iv10RE+VHD 7D9lPppg+arYnXD3fy9DcQYD6cnuUtlaBYaYWbNR1sFlF8906S7ZPvqeQIQPoixBrBHq 1uX+/E585thte8eQTE3TWDW1x7B/aW8yv9/5olw/qa08ztBgTM8WVFz+FvdAfcXH/Dlv nhHIILHMYZirZOmxh7iY9fzlGGHQe4z6G4Vv2G3CLIF/SxrnQpYnaUYNHchrCB4d2arL S5vFUkpfwTbSvVdq+n4nREtq8ifku2U1hCOpN7rEExvE0/O9eV0cWL20k2uvE963R1EN B6fw== X-Gm-Message-State: AOAM530Qgln7TNITWKboXCWrvoCev/ERJuroo3nNWHbJJH9KVn3FMSFD FNMTeCbkjeSCyoOzaKe+lFnq9dkUYs/CcavrYA6PgQ== X-Received: by 2002:a17:902:e993:b029:d6:41d8:9ca3 with SMTP id f19-20020a170902e993b02900d641d89ca3mr31778200plb.57.1604510912336; Wed, 04 Nov 2020 09:28:32 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andrey Konovalov Date: Wed, 4 Nov 2020 18:28:21 +0100 Message-ID: Subject: Re: [PATCH v7 34/41] kasan, x86, s390: update undef CONFIG_KASAN To: Vasily Gorbik Cc: Vincenzo Frascino , kasan-dev , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Andrew Morton , Linux ARM , Linux Memory Management List , LKML , Catalin Marinas , Will Deacon Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 2, 2020 at 5:05 PM Andrey Konovalov wrote: > > 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 > Hi Vasily, Could you give your ack on this patch? The full series is here: https://lore.kernel.org/linux-arm-kernel/cover.1604333009.git.andreyknvl@google.com/ Thanks!