Re: [PATCH 2/2] KVM: s390: Return last valid slot if approx index is out-of-bounds

From: Paolo Bonzini
Date: Wed Apr 08 2020 - 05:08:54 EST


On 08/04/20 09:10, Cornelia Huck wrote:
> On Tue, 7 Apr 2020 23:40:59 -0700
> Sean Christopherson <sean.j.christopherson@xxxxxxxxx> wrote:
>
>> 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.
>>
> This also should be cc:stable, with the dependency expressed as
> mentioned by Christian.
>

So,

Cc: stable@xxxxxxxxxxxxxxx # 4.19.x: 0774a964ef56: KVM: Fix out of range accesses to memslots
Cc: stable@xxxxxxxxxxxxxxx # 4.19.x

Paolo