powerpc/kasan: Refactor update of early shadow mappings
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 19 May 2020 05:48:47 +0000 (05:48 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 20 May 2020 13:41:02 +0000 (23:41 +1000)
commit7dec42ab57f2f59feba82abf0353164479bfde4c
treefa4aca707dbc19d34dfb25176fc0b177bbd6fbf9
parent7c31c05e00fc5ff2067332c5f80e525573e7269c
powerpc/kasan: Refactor update of early shadow mappings

kasan_remap_early_shadow_ro() and kasan_unmap_early_shadow_vmalloc()
are both updating the early shadow mapping: the first one sets
the mapping read-only while the other clears the mapping.

Refactor and create kasan_update_early_region()

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/8c496c0828de2608c7c940c45525d177e91b6f1b.1589866984.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/kasan/kasan_init_32.c