Skip to content

Commit 7b03942

Browse files
Alexander Gordeevhcahca
authored andcommitted
s390/vmem: fix virtual vs physical address confusion
Fix virtual vs physical address confusion (which currently are the same). Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent 789dd8c commit 7b03942

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

arch/s390/mm/vmem.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,10 @@ void __init vmem_map_init(void)
747747
}
748748

749749
#ifdef CONFIG_KASAN
750-
for_each_mem_range(i, &base, &end)
751-
set_memory_kasan(base, end);
750+
for_each_mem_range(i, &base, &end) {
751+
set_memory_kasan((unsigned long)__va(base),
752+
(unsigned long)__va(end));
753+
}
752754
#endif
753755
set_memory_rox((unsigned long)_stext,
754756
(unsigned long)(_etext - _stext) >> PAGE_SHIFT);
@@ -763,8 +765,10 @@ void __init vmem_map_init(void)
763765
if (static_key_enabled(&cpu_has_bear))
764766
set_memory_nx(0, 1);
765767
set_memory_nx(PAGE_SIZE, 1);
766-
if (debug_pagealloc_enabled())
767-
set_memory_4k(0, ident_map_size >> PAGE_SHIFT);
768+
if (debug_pagealloc_enabled()) {
769+
set_memory_4k((unsigned long)__va(0),
770+
ident_map_size >> PAGE_SHIFT);
771+
}
768772

769773
pr_info("Write protected kernel read-only data: %luk\n",
770774
(unsigned long)(__end_rodata - _stext) >> 10);

0 commit comments

Comments
 (0)