linux_dsm_epyc7002/arch/s390
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: 0774a964ef: 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
..
appldata proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
boot KVM/arm updates for Linux 5.7 2020-03-31 10:44:53 -04:00
configs s390/defconfig: enable CONFIG_PROTECTED_VIRTUALIZATION_GUEST 2020-02-17 18:01:57 +01:00
crypto s390/pkey/zcrypt: Support EP11 AES secure keys 2020-01-30 13:07:56 +01:00
hypfs fs_parse: fold fs_parameter_desc/fs_parameter_spec 2020-02-07 14:48:37 -05:00
include ARM: 2020-04-02 15:13:15 -07:00
kernel ARM: 2020-04-02 15:13:15 -07:00
kvm KVM: s390: Return last valid slot if approx index is out-of-bounds 2020-04-14 10:39:57 -04:00
lib s390/test_unwind: fix spelling mistake "reqister" -> "register" 2019-12-11 19:53:23 +01:00
mm KVM: s390: vsie: Fix possible race when shadowing region 3 tables 2020-04-07 13:12:38 +02:00
net s390/bpf: Remove JITed image size limitations 2019-11-18 19:51:16 -08:00
numa s390/numa: correct early_param handling 2019-08-26 12:51:17 +02:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390/pci: Fix unexpected write combine on resource 2020-03-04 11:18:03 +01:00
purgatory s390/purgatory: do not build purgatory with kcov, kasan and friends 2019-12-18 23:29:26 +01:00
scripts s390/build: use size command to perform empty .bss check 2019-08-08 14:36:53 +02:00
tools kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kbuild s390/kexec_file: Add purgatory 2018-04-16 09:10:22 +02:00
Kconfig ima: add a new CONFIG for loading arch-specific policies 2020-03-12 07:43:57 -04:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile s390: make 'install' not depend on vmlinux 2020-02-17 18:01:58 +01:00