linux-stable/arch
Sean Christopherson afd621673f KVM: x86/mmu: Use -1 to flag an undefined spte in get_mmio_spte()
commit 2aa078932f upstream.

Return -1 from the get_walk() helpers if the shadow walk doesn't fill at
least one spte, which can theoretically happen if the walk hits a
not-present PDPTR.  Returning the root level in such a case will cause
get_mmio_spte() to return garbage (uninitialized stack data).  In
practice, such a scenario should be impossible as KVM shouldn't get a
reserved-bit page fault with a not-present PDPTR.

Note, using mmu->root_level in get_walk() is wrong for other reasons,
too, but that's now a moot point.

Fixes: 95fb5b0258 ("kvm: x86/mmu: Support MMIO in the TDP MMU")
Cc: Ben Gardon <bgardon@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20201218003139.2167891-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:18:22 +01:00
..
alpha local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arm local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arm64 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
c6x arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
csky local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
h8300 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
hexagon local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
ia64 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
m68k local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
microblaze local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
mips local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
nds32 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
nios2 sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
openrisc sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
parisc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
powerpc powerpc: Handle .text.{hot,unlikely}.* in linker script 2021-01-12 20:18:17 +01:00
riscv local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
s390 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
sh local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
sparc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
um um: ubd: Submit all data segments atomically 2021-01-06 14:56:55 +01:00
x86 KVM: x86/mmu: Use -1 to flag an undefined spte in get_mmio_spte() 2021-01-12 20:18:22 +01:00
xtensa local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
.gitignore
Kconfig Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS" 2020-12-30 11:54:29 +01:00