]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/signal: Flush FPSIMD register state when disabling streaming mode
authorMark Brown <broonie@kernel.org>
Wed, 17 Aug 2022 18:23:22 +0000 (19:23 +0100)
committerWill Deacon <will@kernel.org>
Tue, 23 Aug 2022 10:29:11 +0000 (11:29 +0100)
commit8c1b1036fd85da8d5bf1bb5faa8d84e1ba6512dc
tree7542049c01e01e9a1774f5fff4b4a12fb2cf05a8
parenta2750c6f38cd96cf652f5ddc923cadee1cb13e41
arm64/signal: Flush FPSIMD register state when disabling streaming mode

When handling a signal delivered to a context with streaming mode enabled
we will disable streaming mode for the signal handler, when doing so we
should also flush the saved FPSIMD register state like exiting streaming
mode in the hardware would do so that if that state is reloaded we get the
same behaviour. Without this we will reload whatever the last FPSIMD state
that was saved for the task was.

Fixes: c22258481f62 ("arm64/sme: Disable ZA and streaming mode when handling signals")
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220817182324.638214-3-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/signal.c