aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorMark Rutland <[email protected]>2025-05-08 13:26:38 +0000
committerWill Deacon <[email protected]>2025-05-08 14:29:11 +0000
commitf916dd32a943a7ab40497718aa7bcf3648d2bb39 (patch)
treeb814667f357fa044930c1d3ee2e588595a397487 /lib/dynamic_debug.c
parentarm64/fpsimd: ptrace: Do not present register data for inactive mode (diff)
downloadkernel-f916dd32a943a7ab40497718aa7bcf3648d2bb39.tar.gz
kernel-f916dd32a943a7ab40497718aa7bcf3648d2bb39.zip
arm64/fpsimd: ptrace: Mandate SVE payload for streaming-mode state
When a task has PSTATE.SM==1, reads of NT_ARM_SSVE are required to always present a header with SVE_PT_REGS_SVE, and register data in SVE format. Reads of NT_ARM_SSVE must never present register data in FPSIMD format. Within the kernel, we always expect streaming SVE data to be stored in SVE format. Currently a user can write to NT_ARM_SSVE with a header presenting SVE_PT_REGS_FPSIMD rather than SVE_PT_REGS_SVE, placing the task's FPSIMD/SVE data into an invalid state. To fix this we can either: (a) Forbid such writes. (b) Accept such writes, and immediately convert data into SVE format. Take the simple option and forbid such writes. Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Signed-off-by: Mark Rutland <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: David Spickett <[email protected]> Cc: Luis Machado <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Mark Brown <[email protected]> Cc: Will Deacon <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions