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 25C62C433F5 for ; Fri, 28 Jan 2022 16:56:49 +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:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=u3XMqVx1QsbO2ELRNiBQm2wu26yrGmyxlylw0ytrDLc=; b=r2IcT8Qt7EtwADHir8upGnH0bS kDix6fL+faiNA+j5LT5xhHUN1aR+utLw6Gsyq7XRypfGXLw/m1ljFe1CKXMSlhMrACrNtn9PbUaRD kzXgL4oyIFwA5FlY9CoGKlRmyGZizqCxPo2HWceoFRwRtYL86mnxJoeDR/bJEXzAuF+g1hzVthzNu npdDvBr8RM9dZEFl/Fnh7DXz3Pd37HS0KI8CGDUxSL4L7nAcOeoEXToq3WxPvnw6W4F2axZn6zIv/ a0M7yB3/dd+VEYRPDV8WbrCZ3doGf3Ngknf+8uMkoPIoGG+at2W1cXsdTCuKSC9eOHLLT19PLuwin 1Z0CGKFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDUX9-0035yS-Vc; Fri, 28 Jan 2022 16:55:36 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDUX5-0035wb-VM for linux-arm-kernel@lists.infradead.org; Fri, 28 Jan 2022 16:55:33 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D2B4E113E; Fri, 28 Jan 2022 08:55:26 -0800 (PST) Received: from [192.168.4.21] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 961B23F793; Fri, 28 Jan 2022 08:55:25 -0800 (PST) Subject: Re: [PATCH v1 1/4] arm64/mte: Document ABI for asymmetric mode To: Mark Brown , Catalin Marinas , Will Deacon Cc: Joey Gouly , Branislav Rankov , linux-arm-kernel@lists.infradead.org References: <20220127195712.748150-1-broonie@kernel.org> <20220127195712.748150-2-broonie@kernel.org> From: Vincenzo Frascino Message-ID: Date: Fri, 28 Jan 2022 16:55:32 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20220127195712.748150-2-broonie@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220128_085532_163694_E487117A X-CRM114-Status: GOOD ( 26.43 ) 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 Hi Mark, On 1/27/22 7:57 PM, Mark Brown wrote: > MTE3 adds a new mode which is synchronous for writes but asynchronous for > reads. MTE3 (Asymmetric Mode) is synchronous for reads and asynchronous for writes. > 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 A part that: Reviewed-by: Vincenzo Frascino > --- > 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. > > -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel