diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2019-04-26 18:23:34 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-05-02 17:20:26 +0200 |
commit | 2edb16efc899f9c232e2d880930b855e4cf55df4 (patch) | |
tree | 34a2191ff699b55042f7827d2e0bd0852b0d63f3 /arch/powerpc/mm/init_32.c | |
parent | powerpc: disable KASAN instrumentation on early/critical files. (diff) | |
download | linux-2edb16efc899f9c232e2d880930b855e4cf55df4.tar.xz linux-2edb16efc899f9c232e2d880930b855e4cf55df4.zip |
powerpc/32: Add KASAN support
This patch adds KASAN support for PPC32. The following patch
will add an early activation of hash table for book3s. Until
then, a warning will be raised if trying to use KASAN on an
hash 6xx.
To support KASAN, this patch initialises that MMU mapings for
accessing to the KASAN shadow area defined in a previous patch.
An early mapping is set as soon as the kernel code has been
relocated at its definitive place.
Then the definitive mapping is set once paging is initialised.
For modules, the shadow area is allocated at module_alloc().
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/init_32.c')
-rw-r--r-- | arch/powerpc/mm/init_32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 3eb4cb09749c..c3121b6c8cbd 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c @@ -46,6 +46,7 @@ #include <asm/sections.h> #include <asm/hugetlb.h> #include <asm/kup.h> +#include <asm/kasan.h> #include <mm/mmu_decl.h> @@ -179,6 +180,8 @@ void __init MMU_init(void) btext_unmap(); #endif + kasan_mmu_init(); + setup_kup(); /* Shortly after that, the entire linear mapping will be available */ |