summaryrefslogtreecommitdiff
path: root/arch/s390/boot/vmlinux.lds.S
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@linux.ibm.com>2024-06-07 15:19:50 +0300
committerVasily Gorbik <gor@linux.ibm.com>2024-06-11 17:20:40 +0300
commit693d41f7c938f92d881e6a51525e6c132a186afd (patch)
tree44a60655d03d1e68d6b3a5373facae4b9e670a82 /arch/s390/boot/vmlinux.lds.S
parentd8073dc6bc04a061660b31e49a990478a73f1883 (diff)
downloadlinux-693d41f7c938f92d881e6a51525e6c132a186afd.tar.xz
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>
Diffstat (limited to 'arch/s390/boot/vmlinux.lds.S')
-rw-r--r--arch/s390/boot/vmlinux.lds.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S
index 1fe5a1d3ff60..a750711d44c8 100644
--- a/arch/s390/boot/vmlinux.lds.S
+++ b/arch/s390/boot/vmlinux.lds.S
@@ -109,6 +109,7 @@ SECTIONS
#ifdef CONFIG_KERNEL_UNCOMPRESSED
. = ALIGN(PAGE_SIZE);
. += AMODE31_SIZE; /* .amode31 section */
+ . = ALIGN(1 << 20); /* _SEGMENT_SIZE */
#else
. = ALIGN(8);
#endif