Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 's390-7.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik:

- Fix stackleak and xor lib inline asm, constraints and clobbers to
prevent miscompilations and incomplete stack poisoning

* tag 's390-7.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/stackleak: Fix __stackleak_poison() inline assembly constraint
s390/xor: Improve inline assembly constraints
s390/xor: Fix xor_xc_2() inline assembly constraints
s390/xor: Fix xor_xc_5() inline assembly

+6 -7
+1 -1
arch/s390/include/asm/processor.h
··· 159 159 " j 4f\n" 160 160 "3: mvc 8(1,%[addr]),0(%[addr])\n" 161 161 "4:" 162 - : [addr] "+&a" (erase_low), [count] "+&d" (count), [tmp] "=&a" (tmp) 162 + : [addr] "+&a" (erase_low), [count] "+&a" (count), [tmp] "=&a" (tmp) 163 163 : [poison] "d" (poison) 164 164 : "memory", "cc" 165 165 );
+5 -6
arch/s390/lib/xor.c
··· 28 28 " j 3f\n" 29 29 "2: xc 0(1,%1),0(%2)\n" 30 30 "3:" 31 - : : "d" (bytes), "a" (p1), "a" (p2) 32 - : "0", "cc", "memory"); 31 + : "+a" (bytes), "+a" (p1), "+a" (p2) 32 + : : "0", "cc", "memory"); 33 33 } 34 34 35 35 static void xor_xc_3(unsigned long bytes, unsigned long * __restrict p1, ··· 54 54 "2: xc 0(1,%1),0(%2)\n" 55 55 "3: xc 0(1,%1),0(%3)\n" 56 56 "4:" 57 - : "+d" (bytes), "+a" (p1), "+a" (p2), "+a" (p3) 57 + : "+a" (bytes), "+a" (p1), "+a" (p2), "+a" (p3) 58 58 : : "0", "cc", "memory"); 59 59 } 60 60 ··· 85 85 "3: xc 0(1,%1),0(%3)\n" 86 86 "4: xc 0(1,%1),0(%4)\n" 87 87 "5:" 88 - : "+d" (bytes), "+a" (p1), "+a" (p2), "+a" (p3), "+a" (p4) 88 + : "+a" (bytes), "+a" (p1), "+a" (p2), "+a" (p3), "+a" (p4) 89 89 : : "0", "cc", "memory"); 90 90 } 91 91 ··· 96 96 const unsigned long * __restrict p5) 97 97 { 98 98 asm volatile( 99 - " larl 1,2f\n" 100 99 " aghi %0,-1\n" 101 100 " jm 6f\n" 102 101 " srlg 0,%0,8\n" ··· 121 122 "4: xc 0(1,%1),0(%4)\n" 122 123 "5: xc 0(1,%1),0(%5)\n" 123 124 "6:" 124 - : "+d" (bytes), "+a" (p1), "+a" (p2), "+a" (p3), "+a" (p4), 125 + : "+a" (bytes), "+a" (p1), "+a" (p2), "+a" (p3), "+a" (p4), 125 126 "+a" (p5) 126 127 : : "0", "cc", "memory"); 127 128 }