android_kernel_google_msm/arch/x86/kvm
Nadav Amit cfa0515dc4 KVM: x86: Fix far-jump to non-canonical check
commit 7e46dddd6f upstream.

Commit d1442d85cc ("KVM: x86: Handle errors when RIP is set during far
jumps") introduced a bug that caused the fix to be incomplete.  Due to
incorrect evaluation, far jump to segment with L bit cleared (i.e., 32-bit
segment) and RIP with any of the high bits set (i.e, RIP[63:32] != 0) set may
not trigger #GP.  As we know, this imposes a security problem.

In addition, the condition for two warnings was incorrect.

Fixes: d1442d85cc
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
[Add #ifdef CONFIG_X86_64 to avoid complaints of undefined behavior. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-02-02 17:05:25 +08:00
..
cpuid.c KVM: SVM: Add support for AMD's OSVW feature in guests 2012-03-05 14:52:21 +02:00
cpuid.h KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) 2012-12-03 11:47:11 -08:00
emulate.c KVM: x86: Fix far-jump to non-canonical check 2015-02-02 17:05:25 +08:00
i8254.c KVM: x86: Improve thread safety in pit 2015-02-02 17:04:57 +08:00
i8254.h KVM: remove useless function declaration kvm_inject_pit_timer_irqs() 2011-05-11 07:57:09 -04:00
i8259.c KVM: x86: reset edge sense circuit of i8259 on init 2012-03-05 14:57:30 +02:00
irq.c
irq.h KVM: Intelligent device lookup on I/O bus 2011-09-25 19:17:59 +03:00
Kconfig KVM: Expose a version 2 architectural PMU to a guests 2011-12-27 11:24:29 +02:00
kvm_cache_regs.h KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
kvm_timer.h KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
lapic.c KVM: x86: Fix potential divide by 0 in lapic (CVE-2013-6367) 2014-02-06 11:05:48 -08:00
lapic.h KVM: x86: Convert vapic synchronization to _cached functions (CVE-2013-6368) 2014-01-29 05:10:42 -08:00
Makefile KVM: Expose a version 2 architectural PMU to a guests 2011-12-27 11:24:29 +02:00
mmu.c kvm: x86: fix stale mmio cache bug 2015-02-02 17:04:35 +08:00
mmu.h KVM: MMU: mmio page fault support 2011-07-24 11:50:40 +03:00
mmu_audit.c Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-03-28 14:35:31 -07:00
mmutrace.h KVM: MMU: audit: replace mmu audit tracepoint with jump-label 2011-12-27 11:22:05 +02:00
paging_tmpl.h x86: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:15 +08:00
pmu.c KVM: PMU emulation: GLOBAL_CTRL MSR should be enabled on reset 2012-04-10 15:34:10 +03:00
svm.c kvm: x86: don't kill guest on unknown exit reason 2015-02-02 17:04:59 +08:00
timer.c KVM: x86: Simplify kvm timer handler 2011-12-27 11:17:05 +02:00
trace.h KVM: Use __print_symbolic() for vmexit tracepoints 2011-09-25 19:17:59 +03:00
tss.h
vmx.c kvm: x86: don't kill guest on unknown exit reason 2015-02-02 17:04:59 +08:00
x86.c KVM: x86: Prevent host from panicking on shared MSR writes. 2015-02-02 17:04:57 +08:00
x86.h kvm: x86: fix stale mmio cache bug 2015-02-02 17:04:35 +08:00