diff options
-rw-r--r-- | arch/s390/boot/startup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c index c59014945af0..cc8753c0c121 100644 --- a/arch/s390/boot/startup.c +++ b/arch/s390/boot/startup.c @@ -478,8 +478,12 @@ void startup_kernel(void) * before the kernel started. Therefore, in case the two sections * overlap there is no risk of corrupting any data. */ - if (kaslr_enabled()) - amode31_lma = randomize_within_range(vmlinux.amode31_size, PAGE_SIZE, 0, SZ_2G); + if (kaslr_enabled()) { + unsigned long amode31_min; + + amode31_min = (unsigned long)_decompressor_end; + amode31_lma = randomize_within_range(vmlinux.amode31_size, PAGE_SIZE, amode31_min, SZ_2G); + } if (!amode31_lma) amode31_lma = __kaslr_offset_phys - vmlinux.amode31_size; physmem_reserve(RR_AMODE31, amode31_lma, vmlinux.amode31_size); |