All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64/mte: Clarify mode reported by PR_GET_TAGGED_ADDR_CTRL
@ 2022-01-27 19:03 Mark Brown
  2022-02-01 18:31 ` Catalin Marinas
  2022-02-15 23:18 ` Will Deacon
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2022-01-27 19:03 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel, Mark Brown

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 <broonie@kernel.org>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64/mte: Clarify mode reported by PR_GET_TAGGED_ADDR_CTRL
  2022-01-27 19:03 [PATCH] arm64/mte: Clarify mode reported by PR_GET_TAGGED_ADDR_CTRL Mark Brown
@ 2022-02-01 18:31 ` Catalin Marinas
  2022-02-15 23:18 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2022-02-01 18:31 UTC (permalink / raw)
  To: Mark Brown; +Cc: Will Deacon, linux-arm-kernel

On Thu, Jan 27, 2022 at 07:03:23PM +0000, Mark Brown wrote:
> 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 <broonie@kernel.org>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64/mte: Clarify mode reported by PR_GET_TAGGED_ADDR_CTRL
  2022-01-27 19:03 [PATCH] arm64/mte: Clarify mode reported by PR_GET_TAGGED_ADDR_CTRL Mark Brown
  2022-02-01 18:31 ` Catalin Marinas
@ 2022-02-15 23:18 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2022-02-15 23:18 UTC (permalink / raw)
  To: Catalin Marinas, Mark Brown; +Cc: kernel-team, Will Deacon, linux-arm-kernel

On Thu, 27 Jan 2022 19:03:23 +0000, Mark Brown wrote:
> 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.
> 
> [...]

Applied to arm64 (for-next/docs), thanks!

[1/1] arm64/mte: Clarify mode reported by PR_GET_TAGGED_ADDR_CTRL
      https://git.kernel.org/arm64/c/4c022f57ad95

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-15 23:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 19:03 [PATCH] arm64/mte: Clarify mode reported by PR_GET_TAGGED_ADDR_CTRL Mark Brown
2022-02-01 18:31 ` Catalin Marinas
2022-02-15 23:18 ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.