Commit 92bca2fe authored by Vasily Gorbik's avatar Vasily Gorbik Committed by Heiko Carstens

s390/kasan: avoid confusing naming

Kasan has nothing to do with vmemmap, strip vmemmap from function names
to avoid confusing people.
Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 39f2899b
...@@ -87,7 +87,7 @@ enum populate_mode { ...@@ -87,7 +87,7 @@ enum populate_mode {
POPULATE_ZERO_SHADOW, POPULATE_ZERO_SHADOW,
POPULATE_SHALLOW POPULATE_SHALLOW
}; };
static void __init kasan_early_vmemmap_populate(unsigned long address, static void __init kasan_early_pgtable_populate(unsigned long address,
unsigned long end, unsigned long end,
enum populate_mode mode) enum populate_mode mode)
{ {
...@@ -367,26 +367,24 @@ void __init kasan_early_init(void) ...@@ -367,26 +367,24 @@ void __init kasan_early_init(void)
* +-----------------+ +- shadow end ---+ * +-----------------+ +- shadow end ---+
*/ */
/* populate kasan shadow (for identity mapping and zero page mapping) */ /* populate kasan shadow (for identity mapping and zero page mapping) */
kasan_early_vmemmap_populate(__sha(0), __sha(memsize), POPULATE_MAP); kasan_early_pgtable_populate(__sha(0), __sha(memsize), POPULATE_MAP);
if (IS_ENABLED(CONFIG_MODULES)) if (IS_ENABLED(CONFIG_MODULES))
untracked_mem_end = kasan_vmax - MODULES_LEN; untracked_mem_end = kasan_vmax - MODULES_LEN;
if (IS_ENABLED(CONFIG_KASAN_VMALLOC)) { if (IS_ENABLED(CONFIG_KASAN_VMALLOC)) {
untracked_mem_end = kasan_vmax - vmalloc_size - MODULES_LEN; untracked_mem_end = kasan_vmax - vmalloc_size - MODULES_LEN;
/* shallowly populate kasan shadow for vmalloc and modules */ /* shallowly populate kasan shadow for vmalloc and modules */
kasan_early_vmemmap_populate(__sha(untracked_mem_end), kasan_early_pgtable_populate(__sha(untracked_mem_end), __sha(kasan_vmax),
__sha(kasan_vmax), POPULATE_SHALLOW); POPULATE_SHALLOW);
} }
/* populate kasan shadow for untracked memory */ /* populate kasan shadow for untracked memory */
kasan_early_vmemmap_populate(__sha(max_physmem_end), kasan_early_pgtable_populate(__sha(max_physmem_end), __sha(untracked_mem_end),
__sha(untracked_mem_end),
POPULATE_ZERO_SHADOW); POPULATE_ZERO_SHADOW);
kasan_early_vmemmap_populate(__sha(kasan_vmax), kasan_early_pgtable_populate(__sha(kasan_vmax), __sha(vmax_unlimited),
__sha(vmax_unlimited),
POPULATE_ZERO_SHADOW); POPULATE_ZERO_SHADOW);
/* memory allocated for identity mapping structs will be freed later */ /* memory allocated for identity mapping structs will be freed later */
pgalloc_freeable = pgalloc_pos; pgalloc_freeable = pgalloc_pos;
/* populate identity mapping */ /* populate identity mapping */
kasan_early_vmemmap_populate(0, memsize, POPULATE_ONE2ONE); kasan_early_pgtable_populate(0, memsize, POPULATE_ONE2ONE);
kasan_set_pgd(early_pg_dir, _ASCE_TYPE_REGION2); kasan_set_pgd(early_pg_dir, _ASCE_TYPE_REGION2);
kasan_enable_dat(); kasan_enable_dat();
/* enable kasan */ /* enable kasan */
......
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