From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 850ECC25B07 for ; Tue, 9 Aug 2022 08:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237764AbiHIIvE (ORCPT ); Tue, 9 Aug 2022 04:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241232AbiHIIu7 (ORCPT ); Tue, 9 Aug 2022 04:50:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90EC238B7 for ; Tue, 9 Aug 2022 01:50:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2F85660B42 for ; Tue, 9 Aug 2022 08:50:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80EFEC433C1; Tue, 9 Aug 2022 08:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660035057; bh=evTfIp15YyJmRvR5HorDzyJW/SaBilfmMUYg1BqmHzQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gBG9lyUoGhtkq9EO2+XPT+f/AbSBG6qLiWuHLpcsGpA+/rqd3it0dW2DA/IIdR1DF qOzaAzwYnoAbPzi+C7mAAK6iiMdcCG2VFq+NDv0oGv1iMf2TmBXFJZs0gzQcT4pjN4 qrwweEaKhTtNGNkz/dQUNKbCQ2f0ZB/hRgVuUZuc2hoI7aYXaijW8EOBNvvLo90Ckl 19oEF+gEdsPsZjXrgR0VPRBgaWY46A8BEdLmfeLOMNZJ5QObSgqtGaa5RUzVxqxOqb 42FcQ5J+69I1CKOXAgCJIe/uGZj5h+qVYXjjJT2jB9QSRQMEB/vKGy/jLfayLAP3ji usM04TTSS14nw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oLKwx-001s6n-9T; Tue, 09 Aug 2022 09:50:55 +0100 Date: Tue, 09 Aug 2022 09:50:55 +0100 Message-ID: <875yj1x0k0.wl-maz@kernel.org> From: Marc Zyngier To: Evgenii Stepanov Cc: Catalin Marinas , Will Deacon , Peter Collingbourne , Vincenzo Frascino , Andrey Konovalov , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mte: Follow arm64.nomte override in MMU setup. In-Reply-To: <20220805214734.1937451-1-eugenis@google.com> References: <20220805214734.1937451-1-eugenis@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: eugenis@google.com, catalin.marinas@arm.com, will@kernel.org, pcc@google.com, vincenzo.frascino@arm.com, andreyknvl@gmail.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 05 Aug 2022 22:47:34 +0100, Evgenii Stepanov wrote: > > The current code sets up the memory attribute for Normal Tagged memory > in MAIR_EL1 whenever MTE is supported according to AA64PFR1.MTE without > taking arm64.nomte command line option into account. > > This breaks when tag pages are reused as regular memory, as direct > access to such pages through the linear map may create an invalid DRAM > address (tags-of-tags). How comes such memory is being used? How comes it is in the linear map? arm64.nomte is affecting the use of MTE feature on the platform. It doesn't guard the use of a MTE carve-out, and doesn't allow it to be used in any shape or form. To use this memory, you should remove the MTE configuration altogether, as you cannot infer what the CPU is doing with it. M. -- Without deviation from the norm, progress is not possible.