s390/stackleak: Use exrl instead of ex in __stackleak_poison()
authorSven Schnelle <svens@linux.ibm.com>
Wed, 8 Jan 2025 14:27:02 +0000 (15:27 +0100)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Mon, 13 Jan 2025 08:50:17 +0000 (09:50 +0100)
exrl is present in all machines currently supported, therefore prefer
it over ex. This saves one instruction and doesn't need an additional
register to hold the address of the target instruction.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/include/asm/processor.h

index 8761fd01a9f09fd9b1bc0f1e650556b6e4aaee87..4f8d5592c2981c52a00111254daf6b7a1db5c5b9 100644 (file)
@@ -163,8 +163,7 @@ static __always_inline void __stackleak_poison(unsigned long erase_low,
                "       la      %[addr],256(%[addr])\n"
                "       brctg   %[tmp],0b\n"
                "1:     stg     %[poison],0(%[addr])\n"
-               "       larl    %[tmp],3f\n"
-               "       ex      %[count],0(%[tmp])\n"
+               "       exrl    %[count],3f\n"
                "       j       4f\n"
                "2:     stg     %[poison],0(%[addr])\n"
                "       j       4f\n"