]> git.baikalelectronics.ru Git - kernel.git/commit
s390/boot: simplify and fix kernel memory layout setup
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 14 Oct 2021 11:53:54 +0000 (13:53 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 16 Nov 2021 11:29:19 +0000 (12:29 +0100)
commita2bb9a0d7fba6a9169e8a9885660d7ff54cd1712
tree7c60625d9dc5ecf1cdf54f46687f863b8af9836c
parent860fe97c67784cf04255099ab6131eaf0e019c50
s390/boot: simplify and fix kernel memory layout setup

Initial KASAN shadow memory range was picked to preserve original kernel
modules area position. With protected execution support, which might
impose addressing limitation on vmalloc area and hence affect modules
area position, current fixed KASAN shadow memory range is only making
kernel memory layout setup more complex. So move it to the very end of
available virtual space and simplify calculations.

At the same time return to previous kernel address space split. In
particular commit 8489995674c1 ("s390: setup kernel memory layout
early") introduced precise identity map size calculation and keeping
vmemmap left most starting from a fresh region table entry. This didn't
take into account additional mapping region requirement for potential
DCSS mapping above available physical memory. So go back to virtual
space split between 1:1 mapping & vmemmap array once vmalloc area size
is subtracted.

Cc: stable@vger.kernel.org
Fixes: 8489995674c1 ("s390: setup kernel memory layout early")
Reported-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/Kconfig
arch/s390/boot/startup.c