summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorNadav Amit <nadav.amit@gmail.com>2014-12-11 12:27:14 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-11 12:27:32 +0100
commitab646f54f4fd1a8b9671b8707f0739fdd28ce2b1 (patch)
tree1c9bdd996c291cc2aaf0d2eeddac426a43ea776e /arch/x86/kvm/emulate.c
parent78051e3b7e35722ad3f31dd611f1b34770bddab8 (diff)
downloadop-kernel-dev-ab646f54f4fd1a8b9671b8707f0739fdd28ce2b1.zip
op-kernel-dev-ab646f54f4fd1a8b9671b8707f0739fdd28ce2b1.tar.gz
KVM: x86: em_ret_far overrides cpl
commit d50eaa18039b ("KVM: x86: Perform limit checks when assigning EIP") mistakenly used zero as cpl on em_ret_far. Use the actual one. Fixes: d50eaa18039b8b848c2285478d0775335ad5e930 Cc: stable@vger.kernel.org Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index a8fcec6..9715d6e 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2130,7 +2130,7 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt)
/* Outer-privilege level return is not implemented */
if (ctxt->mode >= X86EMUL_MODE_PROT16 && (cs & 3) > cpl)
return X86EMUL_UNHANDLEABLE;
- rc = __load_segment_descriptor(ctxt, (u16)cs, VCPU_SREG_CS, 0, false,
+ rc = __load_segment_descriptor(ctxt, (u16)cs, VCPU_SREG_CS, cpl, false,
&new_desc);
if (rc != X86EMUL_CONTINUE)
return rc;
OpenPOWER on IntegriCloud