[PATCH v2] arm64/gcs: Fix error handling in arch_set_shadow_stack_status()

Will Deacon will at kernel.org
Tue Feb 3 12:29:01 PST 2026


On Mon, 02 Feb 2026 10:32:51 -0800, Breno Leitao wrote:
> alloc_gcs() returns an error-encoded pointer on failure, which comes
> from do_mmap(), not NULL.
> 
> The current NULL check fails to detect errors, which could lead to using
> an invalid GCS address.
> 
> Use IS_ERR_VALUE() to properly detect errors, consistent with the
> check in gcs_alloc_thread_stack().
> 
> [...]

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

[1/1] arm64/gcs: Fix error handling in arch_set_shadow_stack_status()
      https://git.kernel.org/arm64/c/53c998527ffa

Cheers,
-- 
Will

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



More information about the linux-arm-kernel mailing list