summaryrefslogtreecommitdiff
path: root/arch/s390/boot/boot.h
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2023-01-27 19:08:29 +0300
committerHeiko Carstens <hca@linux.ibm.com>2023-02-06 13:13:55 +0300
commit8382c963249dafcbe809dea307c2de16d5645579 (patch)
tree688302288abea53f10fdf777f7510a31b4d70ea2 /arch/s390/boot/boot.h
parent3615d01114047ffce3a0942c21e6402c7b49bb3f (diff)
downloadlinux-8382c963249dafcbe809dea307c2de16d5645579.tar.xz
s390/boot: avoid page tables memory in kaslr
If kernel is build without KASAN support there is a chance that kernel image is going to be positioned by KASLR code to overlap with identity mapping page tables. When kernel is build with KASAN support enabled memory which is potentially going to be used for page tables and KASAN shadow mapping is accounted for in KASLR with the use of kasan_estimate_memory_needs(). Split this function and introduce vmem_estimate_memory_needs() to cover decompressor's vmem identity mapping page tables. Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled") 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>
Diffstat (limited to 'arch/s390/boot/boot.h')
-rw-r--r--arch/s390/boot/boot.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h
index e91bbb004efb..ed85b144119a 100644
--- a/arch/s390/boot/boot.h
+++ b/arch/s390/boot/boot.h
@@ -46,6 +46,7 @@ void sclp_early_setup_buffer(void);
void print_pgm_check_info(void);
unsigned long get_random_base(unsigned long safe_addr);
void setup_vmem(unsigned long asce_limit);
+unsigned long vmem_estimate_memory_needs(unsigned long online_mem_total);
void __printf(1, 2) decompressor_printk(const char *fmt, ...);
void error(char *m);