]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kasan: Declare kasan_init_region() weak
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 19 May 2020 05:48:48 +0000 (05:48 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 20 May 2020 13:41:03 +0000 (23:41 +1000)
commit5fe88bb0b93b60dfdedc2d4112bc0ceed7d68c12
tree069683bd451176fbab5e0a2277facaf9bec6cc1d
parenta6ea1d0462a3bdb0a9aa65207dad8c6815ca70d3
powerpc/kasan: Declare kasan_init_region() weak

In order to alloc sub-arches to alloc KASAN regions using optimised
methods (Huge pages on 8xx, BATs on BOOK3S, ...), declare
kasan_init_region() weak.

Also make kasan_init_shadow_page_tables() accessible from outside,
so that it can be called from the specific kasan_init_region()
functions if needed.

And populate remaining KASAN address space only once performed
the region mapping, to allow 8xx to allocate hugepd instead of
standard page tables for mapping via 8M hugepages.

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