From patchwork Fri Nov 13 22:16:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11905049 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 5E5BAC55ABD for ; Fri, 13 Nov 2020 22:33:36 +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 0F76421D7F for ; Fri, 13 Nov 2020 22:33:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qfiIqWAF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="TaaWdO3Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F76421D7F 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=XWD6AKunjj3kKDH0smHg3oRbV/8V2qTHlcgQ6nsWiTc=; b=qfiIqWAFO8VYiOIcxx0dY0c7n GInlyvJxOZCYMiRi33BziLDh6x+2sWewrUpX9IPprLC5IC9gWrikHG1yj16k8zWnbicgYo1ikRMU6 IB/3MaAbJf2s3USAE/9IqoW2zWwynTU3U8Gd5YOLk/cgJ1ZdDgdgdLwMRuXKEUV9smMnAcc+rSZXU ioiORs2Hy6ARMVGrW/PkOH7AEZLOlZWl5/fJYeiW6+hTJS+wVcmhs7Shy90e/CbWWSwK6rBnaoqIS 7dThKPkaW0wW/4ol7efdVALPZs/9kJIT1Nai0u+D3dPIZ1tDXfDehXzWiNkYU7P9Sxe8QtMS+jXGG Kr2y2Tt2Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdhbm-0006lU-GC; Fri, 13 Nov 2020 22:31:54 +0000 Received: from mail-wm1-x34a.google.com ([2a00:1450:4864:20::34a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdhO3-0000Oe-Jn for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 22:17:53 +0000 Received: by mail-wm1-x34a.google.com with SMTP id s3so4714272wmj.6 for ; Fri, 13 Nov 2020 14:17:40 -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=oVadbN3NqpY7ZnHAx+kB6EDsExDJuzGfxhHAguhdwUM=; b=TaaWdO3Z9oElGMBNzh2f8+qtMVn40dx3CM2RnB9fmkRdKPAllpul9uP+B32dnclVVF 8/Zpl1FFBQh6z6jDC/k81W7Xdlj6R5ZrfiqxiwoaM9xeTVsK1rT4uxOCTksOmNutwZsA ijDa3E8QiM/rulDyo8dTHKe5hm3rRPEvYK2x/W0N73k8uYOu8pQswUBQ0yaPS8w/vnbB N17YiOLHtltDhgW2D11PD98jyYMMcPIOB8DaqqU2uS0fp9CxHxhMATEZF0VlzhAOFpqA 3tDLWDc5OqE1pLZwrlfbhlFSPhp9K8JduDafIEohgehd1y1wboXqhLj13OzmTdupGO8/ mxog== 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=oVadbN3NqpY7ZnHAx+kB6EDsExDJuzGfxhHAguhdwUM=; b=hTwQqTz7eE57TdUEt7nCgOq/LQmBe+Z6WtIf71Y51Fs38LOimR7ZZWfaVLTk0mDcXm EekS7yl4oeQlJ0V/iuYE2iltQHyoMFH5oqjcnpmPj3I/Mzp/byx3+e47Genjp8Gevc9J tB19dCuhCb2M8/4QYgYejGcxU7G4NT2GRU0J4VO+0aLI8oG54y2ANHYhPMDVm6IBpbNd bSLGUzBt9jcxFiFTVm0m3foE8ARScAQ4a45B6sCiijtrVD49r8SfMK/lzdG92/gTHuEO D+LVXsoWA0yk09tu5PExKROcckDz/cHTFrIjXSlX33Rq08VxAm8nW1L4K2jmKWBfBLze LFNA== X-Gm-Message-State: AOAM530avBInqeLb+wE/G1u1zuZhIqG8Y915ezenpec2kKza5KcgKvA1 HQSCazht+RMgDn5++5t8a1who9X08FjPwPzr X-Google-Smtp-Source: ABdhPJwqa2plxzr+Xp6G01BlGars3fgz6BXNB4ELLA3Omf5LGJf2NJmzLu0GLN2zQNArzOvU2iCXktUucOZGgNs+ X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:adf:ebc6:: with SMTP id v6mr5701672wrn.427.1605305859268; Fri, 13 Nov 2020 14:17:39 -0800 (PST) Date: Fri, 13 Nov 2020 23:16:03 +0100 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH mm v10 35/42] kasan, x86, s390: update undef CONFIG_KASAN From: Andrey Konovalov To: Andrew Morton X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201113_171743_722635_9D71D2CC X-CRM114-Status: GOOD ( 13.22 ) 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 , Catalin Marinas , Kevin Brodsky , Will Deacon , Branislav Rankov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Potapenko , Evgenii Stepanov , Andrey Konovalov , Andrey Ryabinin , 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