arm64/ptrace: Expose GCS via ptrace and core files
authorMark Brown <broonie@kernel.org>
Tue, 1 Oct 2024 22:59:06 +0000 (23:59 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Oct 2024 11:04:41 +0000 (12:04 +0100)
commit7ec3b57cb29f8371bf12a725b6e8f75831a03f27
tree44ffff9e205c8d372cd1c38d81fca334dfde0be3
parent16f47bb9ac8afe09e7ca14cc53748f779b2a12e0
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>
arch/arm64/include/uapi/asm/ptrace.h
arch/arm64/kernel/ptrace.c
include/uapi/linux/elf.h