All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] MIPS: KVM: Fix MMU/TLB management issues
@ 2016-08-11 10:52 James Hogan
  2016-08-11 10:58 ` [PATCH 1/4] MIPS: KVM: Fix mapped fault broken commpage handling James Hogan
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: James Hogan @ 2016-08-11 10:52 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: James Hogan, Radim Krčmář, Ralf Baechle,
	linux-mips, kvm, stable

These patches fix several issues in the management of MIPS KVM TLB
faults:

1) kvm_mips_handle_mapped_seg_tlb_fault() misbehaves for virtual address
   zero, which can be hit if the guest creates such a mapping and
   accesses it in a way unexpected for the commpage (e.g. a CACHE
   instruction).

2) kvm_mips_handle_mapped_seg_tlb_fault() doesn't range check the gfn,
   allowing a high mapping by the guest to overflow the guest_pmap[].

3) kvm_mips_handle_kseg0_tlb_fault() has an off by one in its gfn range
   check, which could allow an odd sized guest_pmap[] to be overflowed.

4) some callers of kvm_mips_handle_kseg0_tlb_fault() and
   kvm_mips_handle_mapped_seg_tlb_fault() don't correctly propagate
   errors upwards.

They're all marked for stable but won't apply cleanly before v4.8-rc1
due to recent changes. I have backports ready though.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Cc: <stable@vger.kernel.org>

James Hogan (4):
  MIPS: KVM: Fix mapped fault broken commpage handling
  MIPS: KVM: Add missing gfn range check
  MIPS: KVM: Fix gfn range check in kseg0 tlb faults
  MIPS: KVM: Propagate kseg0/mapped tlb fault errors

 arch/mips/kvm/emulate.c | 35 ++++++++++++++++------
 arch/mips/kvm/mmu.c     | 68 +++++++++++++++++++++++++++---------------
 2 files changed, 70 insertions(+), 33 deletions(-)

-- 
git-series 0.8.7

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-12 12:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-11 10:52 [PATCH 0/4] MIPS: KVM: Fix MMU/TLB management issues James Hogan
2016-08-11 10:58 ` [PATCH 1/4] MIPS: KVM: Fix mapped fault broken commpage handling James Hogan
2016-08-11 10:58 ` [PATCH 2/4] MIPS: KVM: Add missing gfn range check James Hogan
2016-08-11 10:58 ` [PATCH 3/4] MIPS: KVM: Fix gfn range check in kseg0 tlb faults James Hogan
2016-08-11 10:58 ` [PATCH 4/4] MIPS: KVM: Propagate kseg0/mapped tlb fault errors James Hogan
2016-08-12 12:37 ` [PATCH 0/4] MIPS: KVM: Fix MMU/TLB management issues Radim Krčmář

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.