1
0
Fork 0
alistair23-linux/arch
Sean Christopherson 97daa028f3 KVM: s390: Return last valid slot if approx index is out-of-bounds
Return the index of the last valid slot from gfn_to_memslot_approx() if
its binary search loop yielded an out-of-bounds index.  The index can
be out-of-bounds if the specified gfn is less than the base of the
lowest memslot (which is also the last valid memslot).

Note, the sole caller, kvm_s390_get_cmma(), ensures used_slots is
non-zero.

Fixes: afdad61615 ("KVM: s390: Fix storage attributes migration with memory slots")
Cc: stable@vger.kernel.org # 4.19.x: 0774a964ef56: KVM: Fix out of range accesses to memslots
Cc: stable@vger.kernel.org # 4.19.x
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200408064059.8957-3-sean.j.christopherson@intel.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-04-14 10:39:57 -04:00
..
alpha mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
arc mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
arm ARM: 2020-04-02 15:13:15 -07:00
arm64 ARM: 2020-04-02 15:13:15 -07:00
c6x asm-generic: make more kernel-space headers mandatory 2020-04-02 09:35:25 -07:00
csky asm-generic: make more kernel-space headers mandatory 2020-04-02 09:35:25 -07:00
h8300 asm-generic: make more kernel-space headers mandatory 2020-04-02 09:35:25 -07:00
hexagon mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
ia64 mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
m68k mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
microblaze mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
mips ARM: 2020-04-02 15:13:15 -07:00
nds32 mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
nios2 mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
openrisc mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
parisc mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
powerpc ARM: 2020-04-02 15:13:15 -07:00
riscv mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
s390 KVM: s390: Return last valid slot if approx index is out-of-bounds 2020-04-14 10:39:57 -04:00
sh Merge branch 'akpm' (patches from Andrew) 2020-04-02 13:55:34 -07:00
sparc mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
um Merge branch 'akpm' (patches from Andrew) 2020-04-02 13:55:34 -07:00
unicore32 mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
x86 KVM: VMX: Enable machine check support for 32bit targets 2020-04-14 04:22:10 -04:00
xtensa mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
.gitignore
Kconfig NOHZ full updates: 2020-03-30 18:29:05 -07:00