[PATCH] arm64: cmpxchg_double*: hazard against entire exchange variable

Will Deacon will at kernel.org
Thu Jan 5 10:04:00 PST 2023


On Wed, 4 Jan 2023 15:16:26 +0000, Mark Rutland wrote:
> The inline assembly for arm64's cmpxchg_double*() implementations use a
> +Q constraint to hazard against other accesses to the memory location
> being exchanged. However, the pointer passed to the constraint is a
> pointer to unsigned long, and thus the hazard only applies to the first
> 8 bytes of the location.
> 
> GCC can take advantage of this, assuming that other portions of the
> location are unchanged, leading to a number of potential problems.
> 
> [...]

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

[1/1] arm64: cmpxchg_double*: hazard against entire exchange variable
      https://git.kernel.org/arm64/c/031af50045ea

Cheers,
-- 
Will

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



More information about the linux-arm-kernel mailing list