diff options
| author | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-08-06 10:17:58 -0400 |
|---|---|---|
| committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-08-25 08:35:15 -0400 |
| commit | 614a80e474b227cace52fd6e3c790554db8a396e (patch) | |
| tree | 02a2e3e74d767ede0709d2ba3e17ef1256eb9f0d | |
| parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) | |
KVM: s390: Fix user triggerable bug in dead code
In the early days, we had some special handling for the
KVM_EXIT_S390_SIEIC exit, but this was gone in 2009 with commit
d7b0b5eb3000 (KVM: s390: Make psw available on all exits, not
just a subset).
Now this switch statement is just a sanity check for userspace
not messing with the kvm_run structure. Unfortunately, this
allows userspace to trigger a kernel BUG. Let's just remove
this switch statement.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
| -rw-r--r-- | arch/s390/kvm/kvm-s390.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index ce81eb2ab76a..81b0e11521e4 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
| @@ -1317,19 +1317,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
| 1317 | return -EINVAL; | 1317 | return -EINVAL; |
| 1318 | } | 1318 | } |
| 1319 | 1319 | ||
| 1320 | switch (kvm_run->exit_reason) { | ||
| 1321 | case KVM_EXIT_S390_SIEIC: | ||
| 1322 | case KVM_EXIT_UNKNOWN: | ||
| 1323 | case KVM_EXIT_INTR: | ||
| 1324 | case KVM_EXIT_S390_RESET: | ||
| 1325 | case KVM_EXIT_S390_UCONTROL: | ||
| 1326 | case KVM_EXIT_S390_TSCH: | ||
| 1327 | case KVM_EXIT_DEBUG: | ||
| 1328 | break; | ||
| 1329 | default: | ||
| 1330 | BUG(); | ||
| 1331 | } | ||
| 1332 | |||
| 1333 | vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask; | 1320 | vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask; |
| 1334 | vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr; | 1321 | vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr; |
| 1335 | if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) { | 1322 | if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) { |
