]> www.infradead.org Git - nvme.git/commit
s390/mm: Restore mapping of kernel image using large pages
authorAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 7 Jun 2024 12:19:50 +0000 (14:19 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 11 Jun 2024 14:20:40 +0000 (16:20 +0200)
commit693d41f7c938f92d881e6a51525e6c132a186afd
tree44a60655d03d1e68d6b3a5373facae4b9e670a82
parentd8073dc6bc04a061660b31e49a990478a73f1883
s390/mm: Restore mapping of kernel image using large pages

Since physical and virtual kernel address spaces are uncoupled
the kernel image is not mapped using large segment pages anymore,
which is a regression.

Put the kernel image at the same large segment page offset in
physical memory as in virtual memory. Such approach preserves
the existing number of bits of entropy used for randomization
of the kernel location in virtual memory when KASLR is on.
As result, the kernel is mapped using large segment pages.

Fixes: c98d2ecae08f ("s390/mm: Uncouple physical vs virtual address spaces")
Reported-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/boot/startup.c
arch/s390/boot/vmem.c
arch/s390/boot/vmlinux.lds.S