“2a21c7300b53b744d16903256a172d9cbcfdd03e”上不存在“arch/mips/include/asm/cacheops.h”
  • S
    KVM: x86: Bug the VM if the emulator generates a bogus exception vector · 49a1431d
    Sean Christopherson 提交于
    Bug the VM if KVM's emulator attempts to inject a bogus exception vector.
    The guest is likely doomed even if KVM continues on, and propagating a
    bad vector to the rest of KVM runs the risk of breaking other assumptions
    in KVM and thus triggering a more egregious bug.
    
    All existing users of emulate_exception() have hardcoded vector numbers
    (__load_segment_descriptor() uses a few different vectors, but they're
    all hardcoded), and future users are likely to follow suit, i.e. the
    change to emulate_exception() is a glorified nop.
    
    As for the ctxt->exception.vector check in x86_emulate_insn(), the few
    known times the WARN has been triggered in the past is when the field was
    not set when synthesizing a fault, i.e. for all intents and purposes the
    check protects against consumption of uninitialized data.
    Signed-off-by: NSean Christopherson <seanjc@google.com>
    Reviewed-by: NKees Cook <keescook@chromium.org>
    Reviewed-by: NVitaly Kuznetsov <vkuznets@redhat.com>
    Message-Id: <20220526210817.3428868-8-seanjc@google.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    49a1431d
emulate.c 149.0 KB