Skip to content

Commit

Permalink
Merge tag 'kvm-s390-kernel-access' from emailed bundle
Browse files Browse the repository at this point in the history
Pull s390 kvm fix from Christian Borntraeger:
 "Add missing check for the MEMOP ioctl

  The SIDA MEMOPs must only be used for secure guests, otherwise
  userspace can do unwanted memory accesses"

* tag 'kvm-s390-kernel-access' from emailed bundle:
  KVM: s390: Return error on SIDA memop on normal guest
  • Loading branch information
Linus Torvalds committed Feb 9, 2022
2 parents e6251ab + 2c212e1 commit 09a93c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -4667,6 +4667,8 @@ static long kvm_s390_guest_sida_op(struct kvm_vcpu *vcpu,
return -EINVAL;
if (mop->size + mop->sida_offset > sida_size(vcpu->arch.sie_block))
return -E2BIG;
if (!kvm_s390_pv_cpu_is_protected(vcpu))
return -EINVAL;

switch (mop->op) {
case KVM_S390_MEMOP_SIDA_READ:
Expand Down

0 comments on commit 09a93c1

Please sign in to comment.