Commit 7b03942f authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Heiko Carstens

s390/vmem: fix virtual vs physical address confusion

Fix virtual vs physical address confusion (which currently are the same).
Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 789dd8cb
...@@ -747,8 +747,10 @@ void __init vmem_map_init(void) ...@@ -747,8 +747,10 @@ void __init vmem_map_init(void)
} }
#ifdef CONFIG_KASAN #ifdef CONFIG_KASAN
for_each_mem_range(i, &base, &end) for_each_mem_range(i, &base, &end) {
set_memory_kasan(base, end); set_memory_kasan((unsigned long)__va(base),
(unsigned long)__va(end));
}
#endif #endif
set_memory_rox((unsigned long)_stext, set_memory_rox((unsigned long)_stext,
(unsigned long)(_etext - _stext) >> PAGE_SHIFT); (unsigned long)(_etext - _stext) >> PAGE_SHIFT);
...@@ -763,8 +765,10 @@ void __init vmem_map_init(void) ...@@ -763,8 +765,10 @@ void __init vmem_map_init(void)
if (static_key_enabled(&cpu_has_bear)) if (static_key_enabled(&cpu_has_bear))
set_memory_nx(0, 1); set_memory_nx(0, 1);
set_memory_nx(PAGE_SIZE, 1); set_memory_nx(PAGE_SIZE, 1);
if (debug_pagealloc_enabled()) if (debug_pagealloc_enabled()) {
set_memory_4k(0, ident_map_size >> PAGE_SHIFT); set_memory_4k((unsigned long)__va(0),
ident_map_size >> PAGE_SHIFT);
}
pr_info("Write protected kernel read-only data: %luk\n", pr_info("Write protected kernel read-only data: %luk\n",
(unsigned long)(__end_rodata - _stext) >> 10); (unsigned long)(__end_rodata - _stext) >> 10);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment