[PATCH 0/2] arm64/fp: Fix missing invalidation when working with in memory FP state

Mark Brown posted 2 patches 3 weeks, 4 days ago
arch/arm64/kernel/fpsimd.c | 3 +++
1 file changed, 3 insertions(+)
[PATCH 0/2] arm64/fp: Fix missing invalidation when working with in memory FP state
Posted by Mark Brown 3 weeks, 4 days ago
Mark Rutland identified a repeated pattern where we update the in memory
floating point state for tasks but do not invalidate the tracking of the
last CPU that the task's state was loaded on, meaning that we can
incorrectly fail to load the state from memory due to the checking in
fpsimd_thread_switch().  When we change the in-memory state we need to
also invalidate the last CPU information so that the state is corretly
identified as needing to be reloaded from memory.

This series adds the missing invalidations.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (2):
      arm64/sve: Flush foreign register state in sve_init_regs()
      arm64/sme: Flush foreign register state in do_sme_acc()

 arch/arm64/kernel/fpsimd.c | 3 +++
 1 file changed, 3 insertions(+)
---
base-commit: 8e929cb546ee42c9a61d24fae60605e9e3192354
change-id: 20241030-arm64-fpsimd-foreign-flush-6913aa24cd9b

Best regards,
-- 
Mark Brown <broonie@kernel.org>
Re: [PATCH 0/2] arm64/fp: Fix missing invalidation when working with in memory FP state
Posted by Will Deacon 2 weeks, 4 days ago
On Wed, 30 Oct 2024 20:23:49 +0000, Mark Brown wrote:
> Mark Rutland identified a repeated pattern where we update the in memory
> floating point state for tasks but do not invalidate the tracking of the
> last CPU that the task's state was loaded on, meaning that we can
> incorrectly fail to load the state from memory due to the checking in
> fpsimd_thread_switch().  When we change the in-memory state we need to
> also invalidate the last CPU information so that the state is corretly
> identified as needing to be reloaded from memory.
> 
> [...]

Applied SVE patch (with updated commit message) to arm64 (for-next/fixes),
thanks!

[1/2] arm64/sve: Flush foreign register state in sve_init_regs()
      https://git.kernel.org/arm64/c/751ecf6afd65

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev