android_kernel_oneplus_msm8998/arch/x86/kvm
David Woodhouse eebc3f8ade x86/retpoline: Fill return stack buffer on vmexit
commit 117cc7a908c83697b0b737d15ae1eb5943afe35b upstream.

In accordance with the Intel and AMD documentation, we need to overwrite
all entries in the RSB on exiting a guest, to prevent malicious branch
target predictions from affecting the host kernel. This is needed both
for retpoline and for IBRS.

[ak: numbers again for the RSB stuffing labels]

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: gnomes@lxorguk.ukuu.org.uk
Cc: Rik van Riel <riel@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: thomas.lendacky@amd.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Kees Cook <keescook@google.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Link: https://lkml.kernel.org/r/1515755487-8524-1-git-send-email-dwmw@amazon.co.uk
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Razvan Ghitulete <rga@amazon.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 19:50:13 +01:00
..
assigned-dev.c KVM: x86: move kvm_set_irq_inatomic to legacy device assignment 2015-11-04 16:24:36 +01:00
assigned-dev.h
cpuid.c KVM: x86: disable MPX if host did not enable MPX XSAVE features 2017-07-21 07:44:59 +02:00
cpuid.h kvm: x86: Guest BNDCFGS requires guest MPX support 2017-07-21 07:44:59 +02:00
emulate.c kvm: x86: fix RSM when PCID is non-zero 2018-01-02 20:33:21 +01:00
hyperv.c kvm/x86: Hyper-V HV_X64_MSR_VP_RUNTIME support 2015-10-01 15:06:33 +02:00
hyperv.h kvm/x86: added hyper-v crash msrs into kvm hyperv context 2015-07-23 08:27:06 +02:00
i8254.c KVM: i8254: change PIT discard tick policy 2016-04-12 09:08:33 -07:00
i8254.h
i8259.c KVM: x86: clean/fix memory barriers in irqchip_in_kernel 2015-07-30 16:02:56 +02:00
ioapic.c kvm: x86: memset whole irq_eoi 2016-10-28 03:01:33 -04:00
ioapic.h KVM: x86: Add EOI exit bitmap inference 2015-10-01 15:06:28 +02:00
iommu.c KVM: count number of assigned devices 2015-07-10 13:25:26 +02:00
irq.c KVM: x86: Add support for local interrupt requests from userspace 2015-10-01 15:06:29 +02:00
irq.h KVM: x86: Add support for local interrupt requests from userspace 2015-10-01 15:06:29 +02:00
irq_comm.c KVM: x86: check for pic and ioapic presence before use 2016-12-02 09:09:00 +01:00
Kconfig KVM: x86: select IRQ_BYPASS_MANAGER 2015-10-01 15:06:52 +02:00
kvm_cache_regs.h KVM: x86: API changes for SMM support 2015-06-04 16:01:11 +02:00
lapic.c KVM: x86: flush pending lapic jump label updates on module unload 2017-01-19 20:17:19 +01:00
lapic.h KVM: x86: flush pending lapic jump label updates on module unload 2017-01-19 20:17:19 +01:00
Makefile kvm/x86: move Hyper-V MSR's/hypercall code into hyperv.c file 2015-07-23 08:27:06 +02:00
mmu.c KVM: async_pf: avoid async pf injection when in guest mode 2017-06-14 13:16:21 +02:00
mmu.h KVM: async_pf: avoid async pf injection when in guest mode 2017-06-14 13:16:21 +02:00
mmu_audit.c Minor merge needed, due to function move. 2015-07-01 10:49:25 -07:00
mmutrace.h
mtrr.c KVM: MTRR: fix kvm_mtrr_check_gfn_range_consistency page fault 2016-08-20 18:09:17 +02:00
paging_tmpl.h KVM: x86: MMU: fix ubsan index-out-of-range warning 2016-03-03 15:07:29 -08:00
pmu.c KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch 2015-06-23 14:12:14 +02:00
pmu.h KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch 2015-06-23 14:12:14 +02:00
pmu_amd.c KVM: x86/vPMU: Fix unnecessary signed extension for AMD PERFCTRn 2015-08-11 15:19:41 +02:00
pmu_intel.c KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh() 2017-07-05 14:37:23 +02:00
svm.c x86/retpoline: Fill return stack buffer on vmexit 2018-01-23 19:50:13 +01:00
trace.h KVM: x86: correctly print #AC in traces 2016-01-31 11:28:54 -08:00
tss.h
vmx.c x86/retpoline: Fill return stack buffer on vmexit 2018-01-23 19:50:13 +01:00
x86.c KVM: Fix stack-out-of-bounds read in write_mmio 2018-01-17 09:35:24 +01:00
x86.h x86/fpu: Rename XSAVE macros 2015-09-14 12:21:46 +02:00