# Re: \[PATCH v11 18/39\] arm64/traps: Handle GCS exceptions

- From: Catalin Marinas \<catalin.marinas@arm.com\>
- Date: 2024-08-22 11:32:02 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2024/08/289677
- Thread: https://ratatoskr.run/linux-arm-kernel/2024/08/289561/t.md

```text
On Thu, Aug 22, 2024 at 02:15:21AM +0100, Mark Brown wrote:
> A new exception code is defined for GCS specific faults other than
> standard load/store faults, for example GCS token validation failures,
> add handling for this. These faults are reported to userspace as
> segfaults with code SEGV_CPERR (protection error), mirroring the
> reporting for x86 shadow stack errors.
> 
> GCS faults due to memory load/store operations generate data aborts with
> a flag set, these will be handled separately as part of the data abort
> handling.
> 
> Since we do not currently enable GCS for EL1 we should not get any faults
> there but while we're at it we wire things up there, treating any GCS
> fault as fatal.
> 
> Reviewed-by: Thiago Jung Bauermann <redacted>
> Signed-off-by: Mark Brown <broonie@kernel.org>

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

```
