diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-08-03 13:05:11 +0200 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2017-08-21 15:34:36 +0200 |
commit | 4a4eefcd0e49f9f339933324c1bde431186a0a7d (patch) | |
tree | bd3d10884a4e173722dfad4099f4e20adb66c68e /arch/s390 | |
parent | KVM: s390: take srcu lock when getting/setting storage keys (diff) | |
download | linux-4a4eefcd0e49f9f339933324c1bde431186a0a7d.tar.xz linux-4a4eefcd0e49f9f339933324c1bde431186a0a7d.zip |
KVM: s390: sthyi: fix sthyi inline assembly
The sthyi inline assembly misses register r3 within the clobber
list. The sthyi instruction will always write a return code to
register "R2+1", which in this case would be r3. Due to that we may
have register corruption and see host crashes or data corruption
depending on how gcc decided to allocate and use registers during
compile time.
Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation")
Cc: <stable@vger.kernel.org> # 4.8+
Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kvm/sthyi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/sthyi.c b/arch/s390/kvm/sthyi.c index 926b5244263e..2773a2f6a5c4 100644 --- a/arch/s390/kvm/sthyi.c +++ b/arch/s390/kvm/sthyi.c @@ -394,7 +394,7 @@ static int sthyi(u64 vaddr) "srl %[cc],28\n" : [cc] "=d" (cc) : [code] "d" (code), [addr] "a" (addr) - : "memory", "cc"); + : "3", "memory", "cc"); return cc; } |