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 07A50C433EF for ; Thu, 27 Jan 2022 19:04:48 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=iN+EC9+bEsbb8bjq2q9aotJ4o8g5cdwarWu5pYJaD/U=; b=KPQxE2zFyBfx2V ulZCHOv+OBwFEL0ijfneCQ7+0nyr0NTDd6AzXFFYND/MGUu1RxeDQRUtXDsw3lR7OcZqo8i81xKS8 SIUsbNeQoL0qCqfJb1tESmRAy2AklmRmuOQ4dmGupH7JK9pbAp9nGct7dsYY07G2k62oejkmIyya7 W/AJwdLWKWMgK4K1vBoWKrt0x6aseTe0mkFaqsAHXC1FwFb61DE59bViJkqBDfMneYevI2kq1Y8K9 g90sj8vXFVlCKHVVvzMkhnqXL5QLZ7Sm1fz7X+79JiLQ4ZBskBIPDy0rdRW12i5d0kEAvXItThFDM HmY1mfsmmwUXG589Mq6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDA3R-00GtYJ-Aj; Thu, 27 Jan 2022 19:03:33 +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 1nDA3O-00GtXv-Lg for linux-arm-kernel@lists.infradead.org; Thu, 27 Jan 2022 19:03:31 +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 36DCC61DA5; Thu, 27 Jan 2022 19:03:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96923C340E4; Thu, 27 Jan 2022 19:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643310209; bh=1u3GgcVrBCuPB+Nk0iD/KNiDVtfXQZ34AJA/6tAE6hk=; h=From:To:Cc:Subject:Date:From; b=RE8cyrmv0/09sGujWE5lEYj84C1EPVpuaPxCi8d/viUU7/Qu5/Lfe3QIb7bzcMzpz 7zpourU3y3LIg71Jsmxrl1Sj0rKRQ6ERgDPbTVt3RdZlE18RzmfxV/mhjVVvIYNc+C 8DrEX7C2mrcGCIZDk7vy9hzqhE/e1xRu9AyZqDtMMVjUgvINAdfHt2Eq2btHUW1GWq ZXC8jHtGe54ofqX7doFIqOKtQaVTjJMSZsDCnruoUOq2ONqPEEbQAFCEo+avD48Jmu x+70Cqg+h0wAaYrbSQIIo1P/CBsUXjnEvwZ/GJEc+CQMj9Sd+Jj81xiyYxya+yoEFM b2xQKGHyOO9EA== From: Mark Brown To: Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH] arm64/mte: Clarify mode reported by PR_GET_TAGGED_ADDR_CTRL Date: Thu, 27 Jan 2022 19:03:23 +0000 Message-Id: <20220127190324.660405-1-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1699; h=from:subject; bh=1u3GgcVrBCuPB+Nk0iD/KNiDVtfXQZ34AJA/6tAE6hk=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBh8uxK+PhLiO3eQf3VA7sxneKfZQDBjp8PhUryjyNp UW8VaRyJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYfLsSgAKCRAk1otyXVSH0KtsB/ 9QNUyNa/NV+X2NUOxVBbh/ixRLCuVhIMZ2szPKbQtsMIz+4H2QJnuvqIgejCLd71Huuqs437oU2JU+ 1F8rbehi5Pd6wS/aIIe8okdxgAXK7ZXCIs9Uh0+nes4IM4+QUIG/D8o9XSnsWUNt0Ufp8ufop9KAPr /kgyZwDGyU9/nYR7u9/BQgvZrvhS91whqnMYzRLLdET2Sy9NkEtNPsnbMsqX/OqSX3/cnwG6lcNen7 DmZgnxJGn8nTkGnkQndgXfUao93E7NOmIR+0l6qvjDu2oWE3KoJTGhCd0IiWICzbzPJxLlppJjTLgy y5EsmOdTmmtcFJhscBvgFK4CXfnkTW X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220127_110330_773131_E28F98D9 X-CRM114-Status: GOOD ( 16.26 ) 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 With the current wording readers might infer that PR_GET_TAGGED_ADDR_CTRL will report the mode currently active in the thread however this is not the actual behaviour, instead all modes currently selected by the process will be reported with the mode used depending on the combination of the requested modes and the default set for the current CPU. This has been the case since 433c38f40f6a81 ("arm64: mte: change ASYNC and SYNC TCF settings into bitfields"), before that we did not allow more than one mode to be requested simultaneously. Update the documentation to more clearly reflect current behaviour. Signed-off-by: Mark Brown --- Documentation/arm64/memory-tagging-extension.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/arm64/memory-tagging-extension.rst b/Documentation/arm64/memory-tagging-extension.rst index 7b99c8f428eb..a0ab2f65b235 100644 --- a/Documentation/arm64/memory-tagging-extension.rst +++ b/Documentation/arm64/memory-tagging-extension.rst @@ -91,8 +91,9 @@ mode is specified, the program will run in that mode. If multiple modes are specified, the mode is selected as described in the "Per-CPU preferred tag checking modes" section below. -The current tag check fault mode can be read using the -``prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0)`` system call. +The current tag check fault configuration can be read using the +``prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0)`` system call. If +multiple modes were requested then all will be reported. Tag checking can also be disabled for a user thread by setting the ``PSTATE.TCO`` bit with ``MSR TCO, #1``. -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel