]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: s390: Prevent memslots outside the ASCE range
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 2 Jun 2026 14:23:54 +0000 (16:23 +0200)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 2 Jun 2026 17:27:11 +0000 (19:27 +0200)
commit7b53b4801884d48551f26a17f00cdc0ae4640d64
treeca96d52bcfaed2bd23f7e6e269d49153aa5e1717
parent42546fc642e929de07459ff839a9f43a653ffb4e
KVM: s390: Prevent memslots outside the ASCE range

With KVM_S390_VM_MEM_LIMIT_SIZE, userspace can set the highest address
allowed for the VM. Creating a memslot that lies over the maximum
address does not make sense and is only a potential source of bugs.

Prevent creation of memslots over the maximum address, and prevent the
maximum address from being reduced below the end of existing memslots.

Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260602142356.169458-9-imbrenda@linux.ibm.com>
arch/s390/kvm/kvm-s390.c