Commit e3c2b10d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents d25f0025 893b2418
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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