lkml.org 
[lkml]   [2014]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.2 006/102] KVM: s390: Fix user triggerable bug in dead code
    3.2.64-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Christian Borntraeger <borntraeger@de.ibm.com>

    commit 614a80e474b227cace52fd6e3c790554db8a396e upstream.

    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>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    arch/s390/kvm/kvm-s390.c | 13 -------------
    1 file changed, 13 deletions(-)

    --- a/arch/s390/kvm/kvm-s390.c
    +++ b/arch/s390/kvm/kvm-s390.c
    @@ -516,16 +516,6 @@ rerun_vcpu:

    BUG_ON(vcpu->kvm->arch.float_int.local_int[vcpu->vcpu_id] == NULL);

    - switch (kvm_run->exit_reason) {
    - case KVM_EXIT_S390_SIEIC:
    - case KVM_EXIT_UNKNOWN:
    - case KVM_EXIT_INTR:
    - case KVM_EXIT_S390_RESET:
    - break;
    - default:
    - BUG();
    - }
    -
    vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask;
    vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr;



    \
     
     \ /
      Last update: 2014-11-02 00:21    [W:2.047 / U:0.272 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site