s390/kasan: avoid unnecessary moving of vmemmap
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 10 Sep 2020 20:54:58 +0000 (22:54 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 16 Sep 2020 12:08:47 +0000 (14:08 +0200)
commit8f78657c291f9e5ec26a2a9187938b374629d176
treeee1f1c81279019c7b7f852459317517ef0d2a97a
parentee4b2ce6d1e3baa412148a7b0889f6643749c665
s390/kasan: avoid unnecessary moving of vmemmap

Currently vmemmap area is unconditionally moved beyond Kasan shadow
memory. When Kasan is not enabled vmemmap area position is calculated
in setup_memory_end() and depends on limiting factors like ultravisor
secure storage limit. Try to follow the same logic with Kasan enabled
as well and avoid unnecessary vmemmap area position changes unless it
really intersects with Kasan shadow.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/setup.c