projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91b0aa2
)
KVM: x86: fix use of uninitialized memory as segment descriptor in emulator.
author
Gleb Natapov
<gleb@redhat.com>
Mon, 21 Jan 2013 13:36:48 +0000
(15:36 +0200)
committer
Marcelo Tosatti
<mtosatti@redhat.com>
Thu, 24 Jan 2013 02:40:31 +0000
(
00:40
-0200)
If VMX reports segment as unusable, zero descriptor passed by the emulator
before returning. Such descriptor will be considered not present by the
emulator.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/x86.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index e00dd0515a84874af7b55fd1a5f828180d721ee3..b9f55299ed7e1ac535f8236626c4d5642f4c093b 100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-4489,8
+4489,10
@@
static bool emulator_get_segment(struct x86_emulate_ctxt *ctxt, u16 *selector,
kvm_get_segment(emul_to_vcpu(ctxt), &var, seg);
*selector = var.selector;
- if (var.unusable)
+ if (var.unusable) {
+ memset(desc, 0, sizeof(*desc));
return false;
+ }
if (var.g)
var.limit >>= 12;