Skip to content

Commit b62267b

Browse files
Janis Schoetterl-Glauschgregkh
authored andcommitted
KVM: s390: Return error on SIDA memop on normal guest
commit 2c212e1 upstream. Refuse SIDA memops on guests which are not protected. For normal guests, the secure instruction data address designation, which determines the location we access, is not under control of KVM. Fixes: 19e1227 (KVM: S390: protvirt: Introduce instruction data area bounce buffer) Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com> Cc: stable@vger.kernel.org Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent be93028 commit b62267b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/s390/kvm/kvm-s390.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4654,6 +4654,8 @@ static long kvm_s390_guest_sida_op(struct kvm_vcpu *vcpu,
46544654
return -EINVAL;
46554655
if (mop->size + mop->sida_offset > sida_size(vcpu->arch.sie_block))
46564656
return -E2BIG;
4657+
if (!kvm_s390_pv_cpu_is_protected(vcpu))
4658+
return -EINVAL;
46574659

46584660
switch (mop->op) {
46594661
case KVM_S390_MEMOP_SIDA_READ:

0 commit comments

Comments
 (0)