* [PATCH] KVM: x86 emulator: Fix unconditional return from get_descriptor_table_ptr()
@ 2011-05-21 4:06 Takuya Yoshikawa
2011-05-22 12:57 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Takuya Yoshikawa @ 2011-05-21 4:06 UTC (permalink / raw)
To: avi, mtosatti; +Cc: kvm, yoshikawa.takuya
From: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
A trivial typo was found in the following commit:
commit 7753ed6043bfce55dc0c407490896632014b677e
KVM: x86 emulator: drop vcpu argument from segment/gdt/idt callbacks
When the table indicator flag is set, when the selector selects the
current LDT, get_descriptor_table_ptr() returns without setting the
size and address of the table.
Guests will see #GP if this happens.
Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
---
Is this stable material? -- IIRC, someone reported a suspicous
emulator bug recently.
arch/x86/kvm/emulate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 3bc6b7a..b8b9748 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1158,7 +1158,7 @@ static void get_descriptor_table_ptr(struct x86_emulate_ctxt *ctxt,
u16 sel;
memset (dt, 0, sizeof *dt);
- if (!ops->get_segment(ctxt, &sel, &desc, NULL, VCPU_SREG_LDTR));
+ if (!ops->get_segment(ctxt, &sel, &desc, NULL, VCPU_SREG_LDTR))
return;
dt->size = desc_limit_scaled(&desc); /* what if limit > 65535? */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86 emulator: Fix unconditional return from get_descriptor_table_ptr()
2011-05-21 4:06 [PATCH] KVM: x86 emulator: Fix unconditional return from get_descriptor_table_ptr() Takuya Yoshikawa
@ 2011-05-22 12:57 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2011-05-22 12:57 UTC (permalink / raw)
To: Takuya Yoshikawa; +Cc: mtosatti, kvm, yoshikawa.takuya
On 05/21/2011 07:06 AM, Takuya Yoshikawa wrote:
> From: Takuya Yoshikawa<yoshikawa.takuya@oss.ntt.co.jp>
>
> A trivial typo was found in the following commit:
> commit 7753ed6043bfce55dc0c407490896632014b677e
> KVM: x86 emulator: drop vcpu argument from segment/gdt/idt callbacks
>
> When the table indicator flag is set, when the selector selects the
> current LDT, get_descriptor_table_ptr() returns without setting the
> size and address of the table.
>
> Guests will see #GP if this happens.
>
Thanks, applied.
> Signed-off-by: Takuya Yoshikawa<yoshikawa.takuya@oss.ntt.co.jp>
> ---
> Is this stable material? -- IIRC, someone reported a suspicous
> emulator bug recently.
This was not yet merged upstream, so I folded this into the bad commit,
and upstream will never see the bug. It's now 4bff1e86ad286d in kvm.git.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-22 12:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-21 4:06 [PATCH] KVM: x86 emulator: Fix unconditional return from get_descriptor_table_ptr() Takuya Yoshikawa
2011-05-22 12:57 ` Avi Kivity
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.