diff options
author | Alexandre Ghiti <alexandre.ghiti@canonical.com> | 2021-10-29 06:59:27 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-10-29 08:54:50 -0700 |
commit | 54c5639d8f507ebefa814f574cb6f763033a72a5 (patch) | |
tree | ac9ba5ba08a776edb2f16e7482d6fb35d1fe4e06 /arch/riscv/Kconfig | |
parent | cf11d01135ea1ff7fddb612033e3cb5cde279ff2 (diff) | |
download | lwn-54c5639d8f507ebefa814f574cb6f763033a72a5.tar.gz lwn-54c5639d8f507ebefa814f574cb6f763033a72a5.zip |
riscv: Fix asan-stack clang build
Nathan reported that because KASAN_SHADOW_OFFSET was not defined in
Kconfig, it prevents asan-stack from getting disabled with clang even
when CONFIG_KASAN_STACK is disabled: fix this by defining the
corresponding config.
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Fixes: 8ad8b72721d0 ("riscv: Add KASAN support")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/Kconfig')
-rw-r--r-- | arch/riscv/Kconfig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index c3f3fd583e04..6d5b63bd4bd9 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -163,6 +163,12 @@ config PAGE_OFFSET default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB +config KASAN_SHADOW_OFFSET + hex + depends on KASAN_GENERIC + default 0xdfffffc800000000 if 64BIT + default 0xffffffff if 32BIT + config ARCH_FLATMEM_ENABLE def_bool !NUMA |