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>
This commit is contained in:
Alexander Gordeev 2023-08-03 17:53:20 +02:00 committed by Heiko Carstens
parent 789dd8cb1e
commit 7b03942ff3

View File

@ -747,8 +747,10 @@ void __init vmem_map_init(void)
}
#ifdef CONFIG_KASAN
for_each_mem_range(i, &base, &end)
set_memory_kasan(base, end);
for_each_mem_range(i, &base, &end) {
set_memory_kasan((unsigned long)__va(base),
(unsigned long)__va(end));
}
#endif
set_memory_rox((unsigned long)_stext,
(unsigned long)(_etext - _stext) >> PAGE_SHIFT);
@ -763,8 +765,10 @@ void __init vmem_map_init(void)
if (static_key_enabled(&cpu_has_bear))
set_memory_nx(0, 1);
set_memory_nx(PAGE_SIZE, 1);
if (debug_pagealloc_enabled())
set_memory_4k(0, ident_map_size >> PAGE_SHIFT);
if (debug_pagealloc_enabled()) {
set_memory_4k((unsigned long)__va(0),
ident_map_size >> PAGE_SHIFT);
}
pr_info("Write protected kernel read-only data: %luk\n",
(unsigned long)(__end_rodata - _stext) >> 10);