lkml.org 
[lkml]   [2010]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 117/123] KVM: x86 emulator: Forbid modifying CS segment register by mov instruction
    2.6.33-stable review patch.  If anyone has any objections, please let me know.

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

    From: Gleb Natapov <gleb@redhat.com>

    commit 8b9f44140bc4afd2698413cd9960c3912168ee91 upstream.

    Inject #UD if guest attempts to do so. This is in accordance to Intel
    SDM.

    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    arch/x86/kvm/emulate.c | 6 ++++++
    1 file changed, 6 insertions(+)

    --- a/arch/x86/kvm/emulate.c
    +++ b/arch/x86/kvm/emulate.c
    @@ -1987,6 +1987,12 @@ special_insn:
    int err;

    sel = c->src.val;
    +
    + if (c->modrm_reg == VCPU_SREG_CS) {
    + kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
    + goto done;
    + }
    +
    if (c->modrm_reg == VCPU_SREG_SS)
    toggle_interruptibility(ctxt, X86_SHADOW_INT_MOV_SS);




    \
     
     \ /
      Last update: 2010-03-13 01:29    [W:0.019 / U:60.936 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site