Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp672878pxk; Thu, 1 Oct 2020 11:01:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS4Q+1GGlBmGdaRw0WwWlnZijHBdIgdUpc/3H40iCe7S1pCIR6ElCuPMFHSZVKMmUgJDeW X-Received: by 2002:a17:906:914b:: with SMTP id y11mr9646815ejw.145.1601575281317; Thu, 01 Oct 2020 11:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601575281; cv=none; d=google.com; s=arc-20160816; b=KODskqHRLqXgGzQbsvJj90laY5LddhSvfOxOy6Q3AT9owOUrGqEMbRoJTgPIA1dAWw 7WxpV8qzS25UHuDTfRtOT2CXGv8PjMUU3J//O+3n6k1l2p3cmCjPcjRWVltbV+j8Onr+ KaTGEBXq3c+sYoZSSTUOPW2e71K/HRDEI/TtmEIq3vc+WTsE5B5jtE2f5avUwrOm5jVY 3vLMNzYdZ4ARemqfbjAspUywmOOQ2h7U60rCHDrDuM2HZSHHfkQqAk4YwnZnHivB78Fl LX0n8bHpZoWGTuglovms5r0ZYZghsKGzFnC183B5NhSIuj9ZL8uAOFQwjwOP49G1LNiS 7l3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TLkPGKpJtl4arwZwTjWF8S+it5AeziayXNp4OPYQ4v0=; b=sXmT73PmU2zbUg5maZFQfQXHqeAAHFO8ZEQPgkUA4tD3hPLwvSK2GHA1z4MNQtD0OI 9t80d7C9EGzMkYetzm6hMwKnUAJCWYuKorqlBSpOo9/iRF/ZwB7qlDtqSdi16eH99Z+m 3RxBdipoUYwpMqIcq6jNDibhbeUmqIbib8F/se/sxYCWW68Fykj05hE84qlkE9pwPo6y PzuBqbrBVNWB+yqy0QEi9uTo9i2B1tSY3Fo0Ls11Hhjr7GNewtMuPaPKYuyr57voq+22 gPJoAEgUeRpL1LRhmvmpXcJDZtpVzk/bc29ZYKrszeayW0cYSMue9WedIRgu9GOh8G/y oW4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="L/shRT1p"; 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 o12si3869168eje.30.2020.10.01.11.00.52; Thu, 01 Oct 2020 11:01:21 -0700 (PDT) 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="L/shRT1p"; 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 S1732955AbgJAR73 (ORCPT + 99 others); Thu, 1 Oct 2020 13:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732407AbgJAR73 (ORCPT ); Thu, 1 Oct 2020 13:59:29 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BB14C0613D0 for ; Thu, 1 Oct 2020 10:59:27 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id t17so4086590wmi.4 for ; Thu, 01 Oct 2020 10:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TLkPGKpJtl4arwZwTjWF8S+it5AeziayXNp4OPYQ4v0=; b=L/shRT1pI/QwzoXVUw9bsnM765r2VeYplu8Wz+LYLwBElfLPKZJVaFADv+0FmuGoBe KC2gFqgy0VKtCKReeyzvMp1PYPy4RL3vRvAggOg+cOb81/zFkgM5VGHl/HgaJAn+t4Kh C8GeBwASqw9u4KtGb/4L6OReaEay0i2VgmNW90WpTWQlttYqXQ3OtlXAWq3y3Ftq5eM2 L+/b48+fjZqFxvEUjEqSA86pX3bf8DRTvnOToc7eq9RynDTEYIxfrHldw7vzInvPiHqz WJX+WwvWGNe7qGrKRdTgHDPEIRZY0aarmOSR2tedXtqrGev3BIcIPcDAKQGon+BRR/+k sIUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TLkPGKpJtl4arwZwTjWF8S+it5AeziayXNp4OPYQ4v0=; b=XP4ErCzyx5ForPsFk5yAHJ+IXrwk0rsA9QunkOXnbycoRKyDOMRR0YLrBsaMZJDH0i Y+sv0zZKhKpBN51LiDK8yw1Lb46cj80wyDZxU/7v1fQ1xgNr34DpyatmflTKWmFK4H8V FqgfVXBUUQR/KXptu806j13drn4rU2z9Q403aIexGG21tVWLwPQ0MioWVIQd9MhwMMQb tuxi1aohjsNpRpBCDN1OpmFmP3csKVXYElQJy5ZIGsXyugJKkZw1VqYSdfEjuuE4w8ji fSkiW4t4tG2eapEpwDlFcM+MzIeuFMIVOOFMb4igQei0mtwhB9JE5hPB5E5AEbWOhCPU P6AQ== X-Gm-Message-State: AOAM530oZHxp3VID0IlUu+j54V5C8g+Ax4mTBVNtXaONAXpAKU1+q+K4 mIELDvFUm1frN9QXkMIYGWAlHQ== X-Received: by 2002:a7b:cf30:: with SMTP id m16mr1235811wmg.0.1601575165850; Thu, 01 Oct 2020 10:59:25 -0700 (PDT) Received: from elver.google.com ([100.105.32.75]) by smtp.gmail.com with ESMTPSA id d23sm965442wmb.6.2020.10.01.10.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 10:59:24 -0700 (PDT) Date: Thu, 1 Oct 2020 19:59:19 +0200 From: elver@google.com To: Andrey Konovalov Cc: Dmitry Vyukov , Vincenzo Frascino , Catalin Marinas , kasan-dev@googlegroups.com, Andrey Ryabinin , Alexander Potapenko , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Will Deacon , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 33/39] kasan, x86, s390: update undef CONFIG_KASAN Message-ID: <20201001175919.GT4162920@elver.google.com> References: <78ebf3bed0458172fec9e1e32f2d29d7c8c37341.1600987622.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78ebf3bed0458172fec9e1e32f2d29d7c8c37341.1600987622.git.andreyknvl@google.com> User-Agent: Mutt/1.14.5 (2020-06-23) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 12:50AM +0200, 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 726e264410ff..2ac973983a8e 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.28.0.681.g6f77f65b4e-goog >