diff options
author | Mark Brown <broonie@kernel.org> | 2024-10-02 00:59:06 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2024-10-04 13:04:41 +0200 |
commit | 7ec3b57cb29f8371bf12a725b6e8f75831a03f27 (patch) | |
tree | 44ffff9e205c8d372cd1c38d81fca334dfde0be3 /arch/arm64/include/uapi/asm | |
parent | arm64/signal: Expose GCS state in signal frames (diff) | |
download | linux-7ec3b57cb29f8371bf12a725b6e8f75831a03f27.tar.xz linux-7ec3b57cb29f8371bf12a725b6e8f75831a03f27.zip |
arm64/ptrace: Expose GCS via ptrace and core files
Provide a new register type NT_ARM_GCS reporting the current GCS mode
and pointer for EL0. Due to the interactions with allocation and
deallocation of Guarded Control Stacks we do not permit any changes to
the GCS mode via ptrace, only GCSPR_EL0 may be changed.
Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241001-arm64-gcs-v13-27-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/ptrace.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h index 7fa2f7036aa7..0f39ba4f3efd 100644 --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h @@ -324,6 +324,14 @@ struct user_za_header { #define ZA_PT_SIZE(vq) \ (ZA_PT_ZA_OFFSET + ZA_PT_ZA_SIZE(vq)) +/* GCS state (NT_ARM_GCS) */ + +struct user_gcs { + __u64 features_enabled; + __u64 features_locked; + __u64 gcspr_el0; +}; + #endif /* __ASSEMBLY__ */ #endif /* _UAPI__ASM_PTRACE_H */ |