Thread (9 messages) flat view 9 messages, 4 authors, 2d ago
WARM2d IN LINUX-NEXT

Queued in linux-next as dbd74fcac012 on 2026-09-04.

[PATCH RESEND] xor: add missing vzeroupper to AVX code

From: Eric Biggers <ebiggers@kernel.org>
Date: 2026-08-31 21:23:04
Also in: lkml, stable
Subsystem: library code, software raid (multiple disks) support, the rest · Maintainers: Andrew Morton, Song Liu, Yu Kuai, Linus Torvalds

Since the AVX optimized XOR code uses YMM registers, execute vzeroupper
before returning from it.  This is needed to avoid degrading the
performance of any later SSE code that may happen to be executed.

Fixes: ea4d26ae24e5 ("raid5: add AVX optimized RAID5 checksumming")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---

This didn't get taken through the x86 tree.  Andrew, it seems you're
taking patches to lib/raid/.  Can you apply this one?

 lib/raid/xor/x86/xor-avx.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/lib/raid/xor/x86/xor-avx.c b/lib/raid/xor/x86/xor-avx.c
index f7777d7aa269..95b21e7225e8 100644
--- a/lib/raid/xor/x86/xor-avx.c
+++ b/lib/raid/xor/x86/xor-avx.c
@@ -147,6 +147,7 @@ static void xor_gen_avx(void *dest, void **srcs, unsigned int src_cnt,
 {
 	kernel_fpu_begin();
 	xor_gen_avx_inner(dest, srcs, src_cnt, bytes);
+	asm volatile("vzeroupper");
 	kernel_fpu_end();
 }
 
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help