From patchwork Wed Dec 9 18:24:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11962031 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=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 DA782C4361B for ; Wed, 9 Dec 2020 18:26:03 +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 9460C23C8F for ; Wed, 9 Dec 2020 18:26:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9460C23C8F 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=fAeaaqmdSa/23LQtIPbQz/zbYxFtoofmoRNcOl366ro=; b=JChTxlfXk4+znxW1K/pwrrgjN crIC5cbUePZG2OknoLz5dKLApKrpoEe5yk+Xhnu0O1O/a5sNQdupJlpVmO0gFwwOrOFOKTaaDxDLY RRVZD+QrhxEnhYLjSB/jVuFf4hx15hWnhg79MGh4TyPlNg/i+/L18SrGzeL39BtMOZu9zaQop0xtZ vLCLPdncz67pP5VeT35hqOfn3ORLQFAqhhrvX24dVzSU0FNjQ+vHwQKF8Za+kk9jz7THpXt3xMZBI PwRlS61KM4Kgtij0b1h7pIAfJDWKsg5kr7mQ44TdkkrguoSguxc9oweUAqJ6KbkE8/yrPAYd5YNAD uOBjPa9Sw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn48j-0005D7-9l; Wed, 09 Dec 2020 18:24:37 +0000 Received: from mail-qt1-x84a.google.com ([2607:f8b0:4864:20::84a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn48e-0005BF-Dl for linux-arm-kernel@lists.infradead.org; Wed, 09 Dec 2020 18:24:33 +0000 Received: by mail-qt1-x84a.google.com with SMTP id z43so1873546qtb.0 for ; Wed, 09 Dec 2020 10:24:29 -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=u1bxfC07ZuZBOWsTyyUWqPiXaJQ6KPVo7f7CpicouQI=; b=jtZIxOGhOaY8oAUb8BvD+E79MIfynRleHrjdAsL7FWljVpVMiW+9Os1KVux0owqEVe kMtJVVMUdf40DWsrihpEssIeQvMKLCF7OFDI5UN+uL+0VG3PlWmY+CXC0qOxGNfPMgbB NfRJVSkGoC/wzm3y/97pFIYkMUwMSxktEWQ+N/D0jQWx9QJsSB7gzjwQLCUSeH/FmSJe dh8Qe7dcOeX2MgbUWfd9W9mQlAGniesJc4ri3yHSy+ZogRa9j74wYqIyVNcD5OVEUMnZ aBoOQ8V14gfhZObvQwUWgtENIiXQrwT5r9VXz94S/1UsAeJCHm6UagGVBZFv53XqMazv R2Og== 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=u1bxfC07ZuZBOWsTyyUWqPiXaJQ6KPVo7f7CpicouQI=; b=ofc6yZemaIp+VS0pOQpnY3yMc7WUet7+mx+xbewRWxqkNWaJfzZAdyd3kK1YfcNwLF 62vATxHIlKUeadEhZovvMfw/MEMIIkfBlBUYdgiKiHF7aYRRETP+hhid4LmYPdqMY0C3 jxtR874D/yRStsFMmGG14jHIbiX+uVUS4A5fu4CwdPy3M36cAbPSPo4YyPmFWW23NtRw vdCU+IJmpjBZZz2AhNkhv8PEgSg55ba9E7Mi2AYAuATEEtPNaIh1Q+hg7PzNMIKnPBZt 8LnVMXxomkwTyvZWtFOCss7Rdu5/Wkyq6eATLEwsPD2norqzH8J76m94e+6Q9OwICpYg 0A4Q== X-Gm-Message-State: AOAM53095PKL1qZUtJxTLFCI5z/aJgJN3By/XWziasl/FMejrct9HLmw iXPZGOGWuo/GBSL1QP3m2B0QoM7rQRBrXaRW X-Google-Smtp-Source: ABdhPJxjO35UNSehkB4BGFZLOWZ+ziczwvX3GKaWDtrA9OavTleg8eROATOV1foJb2L/aZPp+CXzNseKMOST5KYg X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:ad4:47c4:: with SMTP id p4mr4509202qvw.23.1607538268306; Wed, 09 Dec 2020 10:24:28 -0800 (PST) Date: Wed, 9 Dec 2020 19:24:16 +0100 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog Subject: [PATCH mm 2/2] Revert "kasan, arm64: don't allow SW_TAGS with ARM64_MTE" From: Andrey Konovalov To: Andrew Morton X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_132432_469932_A685047D X-CRM114-Status: GOOD ( 14.15 ) 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 , 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 This reverts "kasan, arm64: don't allow SW_TAGS with ARM64_MTE". In earlier versions on the hardware tag-based KASAN patchset in-kernel MTE used to be always enabled when CONFIG_ARM64_MTE is on. This caused conflicts with the software tag-based KASAN mode. This is no logner the case: in-kernel MTE is never enabled unless the CONFIG_KASAN_HW_TAGS is enabled, so there are no more conflicts with CONFIG_KASAN_SW_TAGS. Allow CONFIG_KASAN_SW_TAGS to be enabled even when CONFIG_ARM64_MTE is enabled. Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver --- arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 6fefab9041d8..62a7668976a2 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -135,7 +135,7 @@ config ARM64 select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN if !(ARM64_16K_PAGES && ARM64_VA_BITS_48) - select HAVE_ARCH_KASAN_SW_TAGS if (HAVE_ARCH_KASAN && !ARM64_MTE) + select HAVE_ARCH_KASAN_SW_TAGS if HAVE_ARCH_KASAN select HAVE_ARCH_KASAN_HW_TAGS if (HAVE_ARCH_KASAN && ARM64_MTE) select HAVE_ARCH_KFENCE select HAVE_ARCH_KGDB