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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B91AAC433F5 for ; Tue, 15 Feb 2022 18:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F+d4F/N+/5ZSXpv8VswbBgtbiXAtt5PkgCwvvPq1hac=; b=QHsMFLy+TIDggF Ouk8GsjL7CRBktWSsYdcY4fFp7XpdF9PDYc3e30q+832HNrO94iNd261exCO+1JsTNl9yoMPGVT0x exVLJ3lYh4GlTu6t0jG6HT1rAvrvBtrF0E8+yiohfQU9KpexkMK5+55AvACV+I0gjdI1tZUxcaLqp nJWJXPnx+mDDF3Vzpk0uOyHbTevc6BjsasOMTyHnLHfNomEALzZZvUQalbnAT6/V/t0aMUOE+QbDy /my3mH6QUenkXWHkTtAE+c7JWn9SpAmem6MYkYn8aau9MnKoib72dXgH+TT9bUjPq0vcgl6w03N9e lYPO137Q3FuDMh1sswNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nK2LQ-0042Qd-FI; Tue, 15 Feb 2022 18:14:32 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nK2LM-0042PQ-Nf for linux-arm-kernel@lists.infradead.org; Tue, 15 Feb 2022 18:14:30 +0000 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 4EE78616B7; Tue, 15 Feb 2022 18:14:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D389C340EB; Tue, 15 Feb 2022 18:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644948867; bh=wAWVhWk4r/DSlbyxPq4w/QutdaarmisAU6Z5ou0CgiM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k3UVGueNXIDsWi26Nqrj6iLGywUNhwvVdbTbTH+npJpzywJXSA8zUjO0k3rWyjDsM laZbe3GiAQQXIh3JwI5twRDSPTVZIYXXcbHONZf6NeUStnoGsox9qb6dOvNd1GPWsx iIWDfaGzQyMkRhXwfGq2JhueCttk3F/8apY62UxkjArEgT7ng8qpQcr38ElNP3YF4p xdVUS3Liqryj9w7yGL4EsDylRoZMlAWoYd5q7iF7h8MmcVzjHKqM9orT2OrM6qrnfU iY5Y2hG9s0lUSfNLhw7mrFx2/t0PjlPaBNA1HtmXlyPQ+6AftnoFc4ilUOch+wN22o llGUyORC1GsXA== Date: Tue, 15 Feb 2022 18:14:23 +0000 From: Will Deacon To: Mark Brown Cc: Catalin Marinas , Joey Gouly , Branislav Rankov , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 1/4] arm64/mte: Document ABI for asymmetric mode Message-ID: <20220215181422.GA8748@willie-the-truck> References: <20220127195712.748150-1-broonie@kernel.org> <20220127195712.748150-2-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220127195712.748150-2-broonie@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220215_101428_870081_CFC888C1 X-CRM114-Status: GOOD ( 28.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jan 27, 2022 at 07:57:09PM +0000, Mark Brown wrote: > MTE3 adds a new mode which is synchronous for writes but asynchronous for > reads. Document the userspace ABI for this feature, we call the new mode > ASYMM and add a new prctl flag and mte_tcf_preferred value for it. > > Signed-off-by: Mark Brown > --- > Documentation/arm64/memory-tagging-extension.rst | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/Documentation/arm64/memory-tagging-extension.rst b/Documentation/arm64/memory-tagging-extension.rst > index 7b99c8f428eb..5218b838d062 100644 > --- a/Documentation/arm64/memory-tagging-extension.rst > +++ b/Documentation/arm64/memory-tagging-extension.rst > @@ -76,6 +76,9 @@ configurable behaviours: > with ``.si_code = SEGV_MTEAERR`` and ``.si_addr = 0`` (the faulting > address is unknown). > > +- *Asymmetric* - Reads are handled as for synchronous mode while writes > + are handled as for asynchronous mode. > + > The user can select the above modes, per thread, using the > ``prctl(PR_SET_TAGGED_ADDR_CTRL, flags, 0, 0, 0)`` system call where ``flags`` > contains any number of the following values in the ``PR_MTE_TCF_MASK`` > @@ -85,6 +88,7 @@ bit-field: > (ignored if combined with other options) > - ``PR_MTE_TCF_SYNC`` - *Synchronous* tag check fault mode > - ``PR_MTE_TCF_ASYNC`` - *Asynchronous* tag check fault mode > +- ``PR_MTE_TCF_ASYMM`` - *Asymmetric* tag check fault mode > > If no modes are specified, tag check faults are ignored. If a single > mode is specified, the program will run in that mode. If multiple > @@ -139,16 +143,14 @@ tag checking mode as the CPU's preferred tag checking mode. > > The preferred tag checking mode for each CPU is controlled by > ``/sys/devices/system/cpu/cpu/mte_tcf_preferred``, to which a > -privileged user may write the value ``async`` or ``sync``. The default > -preferred mode for each CPU is ``async``. > +privileged user may write the value ``async``, ``sync`` or ``asymm``. The > +default preferred mode for each CPU is ``async``. > > To allow a program to potentially run in the CPU's preferred tag > checking mode, the user program may set multiple tag check fault mode > bits in the ``flags`` argument to the ``prctl(PR_SET_TAGGED_ADDR_CTRL, > flags, 0, 0, 0)`` system call. If the CPU's preferred tag checking > -mode is in the task's set of provided tag checking modes (this will > -always be the case at present because the kernel only supports two > -tag checking modes, but future kernels may support more modes), that > +mode is in the task's set of provided tag checking modes, that > mode will be selected. Otherwise, one of the modes in the task's mode > set will be selected in a currently unspecified manner. I think it's time we specified the "unspecified manner" now that we have three options. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel