[PATCH] arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically

Will Deacon will at kernel.org
Mon Apr 12 13:42:12 BST 2021


On Fri, 9 Apr 2021 18:37:10 +0100, Catalin Marinas wrote:
> The entry from EL0 code checks the TFSRE0_EL1 register for any
> asynchronous tag check faults in user space and sets the
> TIF_MTE_ASYNC_FAULT flag. This is not done atomically, potentially
> racing with another CPU calling set_tsk_thread_flag().
> 
> Replace the non-atomic ORR+STR with an STSET instruction. While STSET
> requires ARMv8.1 and an assembler that understands LSE atomics, the MTE
> feature is part of ARMv8.5 and already requires an updated assembler.

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

[1/1] arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically
      https://git.kernel.org/arm64/c/2decad92f473

Cheers,
-- 
Will

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



More information about the linux-arm-kernel mailing list