]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/xor: Fix xor_xc_5() inline assembly
authorVasily Gorbik <gor@linux.ibm.com>
Mon, 2 Mar 2026 18:03:34 +0000 (19:03 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 3 Mar 2026 15:42:14 +0000 (16:42 +0100)
xor_xc_5() contains a larl 1,2f that is not used by the asm and is not
declared as a clobber. This can corrupt a compiler-allocated value in %r1
and lead to miscompilation. Remove the instruction.

Fixes: 745600ed6965 ("s390/lib: Use exrl instead of ex in xor functions")
Cc: stable@vger.kernel.org
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/lib/xor.c

index 1721b73b780369cbf99f359669b99fc480b88fef..a4d8b51beb95f74da7fe4a88970282a6e2b23816 100644 (file)
@@ -96,7 +96,6 @@ static void xor_xc_5(unsigned long bytes, unsigned long * __restrict p1,
                     const unsigned long * __restrict p5)
 {
        asm volatile(
-               "       larl    1,2f\n"
                "       aghi    %0,-1\n"
                "       jm      6f\n"
                "       srlg    0,%0,8\n"