arm64/sme: Implement ZT0 ptrace support
authorMark Brown <broonie@kernel.org>
Mon, 16 Jan 2023 16:04:47 +0000 (16:04 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 20 Jan 2023 12:23:07 +0000 (12:23 +0000)
commitf90b529bcbe57c66da2b6a0d3c7c81e8567af63d
tree4efec325866de40e4a121251d0c9232ddc8bf3d9
parentee072cf708048c0d718a88159ae7985dd96d316f
arm64/sme: Implement ZT0 ptrace support

Implement support for a new note type NT_ARM64_ZT providing access to
ZT0 when implemented. Since ZT0 is a register with constant size this is
much simpler than for other SME state.

As ZT0 is only accessible when PSTATE.ZA is set writes to ZT0 cause
PSTATE.ZA to be set, the main alternative would be to return -EBUSY in
this case but this seemed more constructive. Practical users are also
going to be working with ZA anyway and have some understanding of the
state.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-12-f2fa0aef982f@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/ptrace.c
include/uapi/linux/elf.h