In the Linux kernel, the following vulnerability has been resolved:
arm64/fpsimd: Avoid clobbering kernel FPSIMD state with SMSTOP
On system with SME, a thread's kernel FPSIMD state may be erroneously clobbered during a context switch immediately after that state is restored. Systems without SME are unaffected.
If the CPU happens to be in streaming SVE mode before a context switch to a thread with kernel FPSIMD state, fpsimdthreadswitch() will restore the kernel FPSIMD state using fpsimdloadkernelstate() while the CPU is still in streaming SVE mode. When fpsimdthreadswitch() subsequently calls fpsimdflushcpustate(), this will execute an SMSTOP, causing an exit from streaming SVE mode. The exit from streaming SVE mode will cause the hardware to reset a number of FPSIMD/SVE/SME registers, clobbering the FPSIMD state.
Fix this by calling fpsimdflushcpu_state() before restoring the kernel FPSIMD state.