Skip to content

Commit 89a65c3

Browse files
brooniectmarinas
authored andcommitted
arm64/ptrace: Flush FP state when setting ZT0
When setting ZT0 via ptrace we do not currently force a reload of the floating point register state from memory, do that to ensure that the newly set value gets loaded into the registers on next task execution. The function was templated off the function for FPSIMD which due to our providing the option of embedding a FPSIMD regset within the SVE regset does not directly include the flush. Fixes: f90b529 ("arm64/sme: Implement ZT0 ptrace support") Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230803-arm64-fix-ptrace-zt0-flush-v1-1-72e854eaf96e@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent c9bb40b commit 89a65c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm64/kernel/ptrace.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,8 @@ static int zt_set(struct task_struct *target,
11801180
if (ret == 0)
11811181
target->thread.svcr |= SVCR_ZA_MASK;
11821182

1183+
fpsimd_flush_task_state(target);
1184+
11831185
return ret;
11841186
}
11851187

0 commit comments

Comments
 (0)