summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-01 09:18:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-01 09:18:25 -0700
commite3c2b10d6f15640407bef3098accf10faa4ecf1b (patch)
tree096817208fa69fa6dac3ea183b8bbead77253b1b /arch
parentd25f002575146d67b5ebea541e6db3696c957c25 (diff)
parent893b24181b4c4bf1fa2841b1ed192e5413a97cb1 (diff)
downloadlinux-stable-e3c2b10d6f15640407bef3098accf10faa4ecf1b.tar.gz
linux-stable-e3c2b10d6f15640407bef3098accf10faa4ecf1b.tar.bz2
linux-stable-e3c2b10d6f15640407bef3098accf10faa4ecf1b.zip
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fix from Catalin Marinas: "Fix memory corruption (overwriting the kmalloc redzone) when saving the SVE state while in SVE streaming mode" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: sme: Use STR P to clear FFR context field in streaming SVE mode
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/include/asm/fpsimdmacros.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/fpsimdmacros.h b/arch/arm64/include/asm/fpsimdmacros.h
index cd03819a3b68..cdf6a35e3994 100644
--- a/arch/arm64/include/asm/fpsimdmacros.h
+++ b/arch/arm64/include/asm/fpsimdmacros.h
@@ -316,12 +316,12 @@
_for n, 0, 15, _sve_str_p \n, \nxbase, \n - 16
cbz \save_ffr, 921f
_sve_rdffr 0
- _sve_str_p 0, \nxbase
- _sve_ldr_p 0, \nxbase, -16
b 922f
921:
- str xzr, [x\nxbase] // Zero out FFR
+ _sve_pfalse 0 // Zero out FFR
922:
+ _sve_str_p 0, \nxbase
+ _sve_ldr_p 0, \nxbase, -16
mrs x\nxtmp, fpsr
str w\nxtmp, [\xpfpsr]
mrs x\nxtmp, fpcr