]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64/signal: Don't assume that TIF_SVE means we saved SVE state
authorMark Brown <broonie@kernel.org>
Tue, 30 Jan 2024 15:43:53 +0000 (15:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:13 +0000 (09:25 +0100)
commit60480c6bc1609e0fc273ba1eaea5bda0beecdaad
tree9878bc6ac54234ff5a679bfd1cbf2190c2e950fe
parent4796a1a413000bcc1f0ade7821253b356de95661
arm64/signal: Don't assume that TIF_SVE means we saved SVE state

commit 61da7c8e2a602f66be578cbbcebe8638c10e0f48 upstream.

When we are in a syscall we will only save the FPSIMD subset even though
the task still has access to the full register set, and on context switch
we will only remove TIF_SVE when loading the register state. This means
that the signal handling code should not assume that TIF_SVE means that
the register state is stored in SVE format, it should instead check the
format that was recorded during save.

Fixes: 8c845e273104 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240130-arm64-sve-signal-regs-v2-1-9fc6f9502782@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/fpsimd.c
arch/arm64/kernel/signal.c