Skip to content

Commit 282da38

Browse files
Vasily GorbikAlexander Gordeev
Vasily Gorbik
authored and
Alexander Gordeev
committed
s390/mm: Consider KMSAN modules metadata for paging levels
The calculation determining whether to use three- or four-level paging didn't account for KMSAN modules metadata. Include this metadata in the virtual memory size calculation to ensure correct paging mode selection and avoiding potentially unnecessary physical memory size limitations. Fixes: 65ca73f ("s390/mm: define KMSAN metadata for vmalloc and modules") Acked-by: Heiko Carstens <[email protected]> Reviewed-by: Alexander Gordeev <[email protected]> Reviewed-by: Ilya Leoshkevich <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 5fa49dd commit 282da38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/s390/boot/startup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ static unsigned long get_vmem_size(unsigned long identity_size,
234234
vsize = round_up(SZ_2G + max_mappable, rte_size) +
235235
round_up(vmemmap_size, rte_size) +
236236
FIXMAP_SIZE + MODULES_LEN + KASLR_LEN;
237+
if (IS_ENABLED(CONFIG_KMSAN))
238+
vsize += MODULES_LEN * 2;
237239
return size_add(vsize, vmalloc_size);
238240
}
239241

0 commit comments

Comments
 (0)