]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: sthyi: fix sthyi inline assembly
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 3 Aug 2017 11:05:11 +0000 (13:05 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 21 Aug 2017 13:34:36 +0000 (15:34 +0200)
commitafaf9e51b771bb4aebae9edb7895fc3bc29952b7
treebd3d10884a4e173722dfad4099f4e20adb66c68e
parent5e4f24261430255e08e47e699a0d070c6f1d643c
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: 2450ce82d300 ("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>
arch/s390/kvm/sthyi.c