diff options
| author | Mark Brown <broonie@kernel.org> | 2024-10-01 23:59:05 +0100 |
|---|---|---|
| committer | Catalin Marinas <catalin.marinas@arm.com> | 2024-10-04 12:04:41 +0100 |
| commit | 16f47bb9ac8afe09e7ca14cc53748f779b2a12e0 (patch) | |
| tree | aa1e7c70ab632e02347e5183d9f2a8577511bbfa /arch/arm64/include/uapi/asm | |
| parent | arm64/signal: Set up and restore the GCS context for signal handlers (diff) | |
| download | linux-16f47bb9ac8afe09e7ca14cc53748f779b2a12e0.tar.gz linux-16f47bb9ac8afe09e7ca14cc53748f779b2a12e0.zip | |
arm64/signal: Expose GCS state in signal frames
Add a context for the GCS state and include it in the signal context when
running on a system that supports GCS. We reuse the same flags that the
prctl() uses to specify which GCS features are enabled and also provide the
current GCS pointer.
We do not support enabling GCS via signal return, there is a conflict
between specifying GCSPR_EL0 and allocation of a new GCS and this is not
an ancticipated use case. We also enforce GCS configuration locking on
signal return.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Acked-by: Yury Khrustalev <yury.khrustalev@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241001-arm64-gcs-v13-26-222b78d87eee@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/uapi/asm')
| -rw-r--r-- | arch/arm64/include/uapi/asm/sigcontext.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h index bb7af77a30a7..d42f7a92238b 100644 --- a/arch/arm64/include/uapi/asm/sigcontext.h +++ b/arch/arm64/include/uapi/asm/sigcontext.h @@ -183,6 +183,15 @@ struct zt_context { __u16 __reserved[3]; }; +#define GCS_MAGIC 0x47435300 + +struct gcs_context { + struct _aarch64_ctx head; + __u64 gcspr; + __u64 features_enabled; + __u64 reserved; +}; + #endif /* !__ASSEMBLY__ */ #include <asm/sve_context.h> |
