OSDN Git Service

KVM: s390: Disallow invalid bits in kvm_valid_regs and kvm_dirty_regs
authorThomas Huth <thuth@redhat.com>
Wed, 4 Sep 2019 08:51:59 +0000 (10:51 +0200)
committerJanosch Frank <frankja@linux.ibm.com>
Wed, 4 Sep 2019 13:38:05 +0000 (15:38 +0200)
commit200824f55eef409830a2d1703d6f81542620c2f0
treeb996508dee9c50a0ac149f4eb354a0939559ff38
parentbe6f55a60d28fb31864d3aab011cf4e1fc0dba04
KVM: s390: Disallow invalid bits in kvm_valid_regs and kvm_dirty_regs

If unknown bits are set in kvm_valid_regs or kvm_dirty_regs, this
clearly indicates that something went wrong in the KVM userspace
application. The x86 variant of KVM already contains a check for
bad bits, so let's do the same on s390x now, too.

Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/lkml/20190904085200.29021-2-thuth@redhat.com/
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
arch/s390/include/uapi/asm/kvm.h
arch/s390/kvm/kvm-s390.c