[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100313001515.372453718@kvm.kroah.org>
Date: Fri, 12 Mar 2010 16:13:35 -0800
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Gleb Natapov <gleb@...hat.com>, Avi Kivity <avi@...hat.com>
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@...hat.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@...hat.com>
Signed-off-by: Avi Kivity <avi@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists