Skip to content

Commit 888468c

Browse files
chleroympe
authored andcommitted
powerpc/32: Disable KASAN with pages bigger than 16k
Mapping of early shadow area is implemented by using a single static page table having all entries pointing to the same early shadow page. The shadow area must therefore occupy full PGD entries. The shadow area has a size of 128MB starting at 0xf8000000. With 4k pages, a PGD entry is 4MB With 16k pages, a PGD entry is 64MB With 64k pages, a PGD entry is 1GB which is too big. Until we rework the early shadow mapping, disable KASAN when the page size is too big. Fixes: 2edb16e ("powerpc/32: Add KASAN support") Cc: [email protected] # v5.2+ Reported-by: kbuild test robot <[email protected]> Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/7195fcde7314ccbf7a081b356084a69d421b10d4.1590660977.git.christophe.leroy@csgroup.eu
1 parent c3ba4db commit 888468c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ config PPC
169169
select HAVE_ARCH_AUDITSYSCALL
170170
select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
171171
select HAVE_ARCH_JUMP_LABEL
172-
select HAVE_ARCH_KASAN if PPC32
173-
select HAVE_ARCH_KASAN_VMALLOC if PPC32
172+
select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
173+
select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14
174174
select HAVE_ARCH_KGDB
175175
select HAVE_ARCH_MMAP_RND_BITS
176176
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT

0 commit comments

Comments
 (0)