Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: KASAN depends on !(ARM64_16K_PAGES && ARM64_VA_BITS_48)

On KASAN + 16K_PAGES + 48BIT_VA
arch/arm64/mm/kasan_init.c: In function ‘kasan_early_init’:
include/linux/compiler.h:484:38: error: call to ‘__compiletime_assert_95’ declared with attribute error: BUILD_BUG_ON failed: !IS_ALIGNED(KASAN_SHADOW_END, PGDIR_SIZE)
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)

Currently KASAN will not work on 16K_PAGES and 48BIT_VA, so
forbid such configuration to avoid above build failure.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reported-by: Suzuki K. Poulose <Suzuki.Poulose@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Andrey Ryabinin and committed by
Catalin Marinas
f1b9032f 3b12acf4

+1 -1
+1 -1
arch/arm64/Kconfig
··· 49 49 select HAVE_ARCH_AUDITSYSCALL 50 50 select HAVE_ARCH_BITREVERSE 51 51 select HAVE_ARCH_JUMP_LABEL 52 - select HAVE_ARCH_KASAN if SPARSEMEM_VMEMMAP 52 + select HAVE_ARCH_KASAN if SPARSEMEM_VMEMMAP && !(ARM64_16K_PAGES && ARM64_VA_BITS_48) 53 53 select HAVE_ARCH_KGDB 54 54 select HAVE_ARCH_SECCOMP_FILTER 55 55 select HAVE_ARCH_TRACEHOOK