提交 8b9f4414 编写于 作者: G Gleb Natapov 提交者: Marcelo Tosatti

KVM: x86 emulator: Forbid modifying CS segment register by mov instruction

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

Cc: stable@kernel.org (2.6.33, 2.6.32)
Signed-off-by: NGleb Natapov <gleb@redhat.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 70e335e1
......@@ -2126,6 +2126,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册