diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2023-01-30 04:11:39 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-02-06 13:13:55 +0300 |
commit | 26ced8124a118e8c59d524da9d9f8d5e30502e60 (patch) | |
tree | 4934b7012ff110c438a0c912dce2a28fc36e74aa /arch/s390/boot | |
parent | 8382c963249dafcbe809dea307c2de16d5645579 (diff) | |
download | linux-26ced8124a118e8c59d524da9d9f8d5e30502e60.tar.xz |
s390/kasan: avoid mapping KASAN shadow for standby memory
KASAN common code is able to handle memory hotplug and create KASAN shadow
memory on a fly. Online memory ranges are available from mem_detect,
use this information to avoid mapping KASAN shadow for standby memory.
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')
-rw-r--r-- | arch/s390/boot/kaslr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/boot/kaslr.c b/arch/s390/boot/kaslr.c index 9cab7bbbfd18..70ff68dd1fee 100644 --- a/arch/s390/boot/kaslr.c +++ b/arch/s390/boot/kaslr.c @@ -182,7 +182,7 @@ unsigned long get_random_base(unsigned long safe_addr) * which vmem and kasan code will use for shadow memory and * pgtable mapping allocations. */ - memory_limit -= kasan_estimate_memory_needs(memory_limit); + memory_limit -= kasan_estimate_memory_needs(online_mem_total); memory_limit -= vmem_estimate_memory_needs(online_mem_total); safe_addr = ALIGN(safe_addr, THREAD_SIZE); |