This is a note to let you know that I've just added the patch titled arm64/ptrace: Flush FP state when setting ZT0 to the 6.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm64-ptrace-flush-fp-state-when-setting-zt0.patch and it can be found in the queue-6.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 89a65c3f170e5c3b05a626046c68354e2afd7912 Mon Sep 17 00:00:00 2001 From: Mark Brown <broonie@xxxxxxxxxx> Date: Thu, 3 Aug 2023 01:19:06 +0100 Subject: arm64/ptrace: Flush FP state when setting ZT0 From: Mark Brown <broonie@xxxxxxxxxx> commit 89a65c3f170e5c3b05a626046c68354e2afd7912 upstream. 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: f90b529bcbe5 ("arm64/sme: Implement ZT0 ptrace support") Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/r/20230803-arm64-fix-ptrace-zt0-flush-v1-1-72e854eaf96e@xxxxxxxxxx Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/arm64/kernel/ptrace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index d7f4f0d1ae12..740e81e9db04 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -1180,6 +1180,8 @@ static int zt_set(struct task_struct *target, if (ret == 0) target->thread.svcr |= SVCR_ZA_MASK; + fpsimd_flush_task_state(target); + return ret; } -- 2.41.0 Patches currently in stable-queue which might be from broonie@xxxxxxxxxx are queue-6.4/net-netsec-ignore-phy-mode-on-synquacer-in-dt-mode.patch queue-6.4/arm64-ptrace-flush-fp-state-when-setting-zt0.patch queue-6.4/arm64-fpsimd-sync-fpsimd-state-with-sve-for-sme-only-systems.patch queue-6.4/arm64-fpsimd-clear-sme-state-in-the-target-task-when-setting-the-vl.patch queue-6.4/arm64-ptrace-don-t-enable-sve-when-setting-streaming-sve.patch queue-6.4/arm64-fpsimd-sync-and-zero-pad-fpsimd-state-for-streaming-sve.patch