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 06F74C433F5 for ; Fri, 28 Jan 2022 16:44:36 +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=AnHuzvH/FmFCaEzXx0Q0h+gKodjJu0oI5h9UtDh/iUg=; b=lAbN7kJ+IArSmI qv4j1TcAu6HN1QmcrMgKjVtIq8r6cPyY6c+d7L+lSBiK2a2WAViGa1ifXs8N6V8ncq+c4X/Tth53P aSxlS+vyf79RmWDEoqv91uWlWCm9hwC7qikG6pCjk1nnt97MHKlazDxIZXRY0WNW31sBD+ltMrCwI 7f36MWuTB6R2vPO8+Y69Igsd1VQUmIeQCbTIjx0HpXbd+lV7kgRlGjwvFUhMUvzSG/AL/kAo00ORj QeC/p9K5K/AiTVRkO1I+34/fvcC0klFYtuzuh9WCEeRyYE98MPNHU47TsHDaNxDOx0QrvdzygOXOR LqecVnq0GS0Is7NQ+edw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDULS-0033Oe-Em; Fri, 28 Jan 2022 16:43:30 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDULO-0033Ni-Tr for linux-arm-kernel@lists.infradead.org; Fri, 28 Jan 2022 16:43:28 +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 D8EEA60A37; Fri, 28 Jan 2022 16:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3846FC340E6; Fri, 28 Jan 2022 16:43:24 +0000 (UTC) Date: Fri, 28 Jan 2022 16:43:21 +0000 From: Catalin Marinas To: Mark Brown Cc: Will Deacon , 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: 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220128_084327_025778_D376CAF9 X-CRM114-Status: GOOD ( 24.76 ) 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. It's the other way around: synchronous for reads, async for writes. You got it correctly in the doc. > 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. That's correct. > + > 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``. That's fine by me. It can be configured at boot for each CPU. Reviewed-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel