aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2021-11-07 18:33:35 +0200
committerStijn Tintel <stijn@linux-ipv6.be>2021-11-07 18:38:16 +0200
commitcbeab2cd991929815f50ee995a593db1ab07bf6e (patch)
tree2c22a4aeea8c3a712a4b3fa0b023230e14404d15
parentda9a8fcbc3cf4319655da1b4d341134b5d4663c1 (diff)
downloadupstream-cbeab2cd991929815f50ee995a593db1ab07bf6e.tar.gz
upstream-cbeab2cd991929815f50ee995a593db1ab07bf6e.tar.bz2
upstream-cbeab2cd991929815f50ee995a593db1ab07bf6e.zip
kernel: add another missing KASAN symbol
Enabling KERNEL_KASAN exposes yet another missing symbol. This did not appear on bcm27xx but is appearing now on x86/64. Add a new kernel build option for KASAN_VMALLOC to fix build on x86/64 with KERNEL_KASAN enabled. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--config/Config-kernel.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index 902e211ea1..f5b42b71ee 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -170,6 +170,22 @@ config KERNEL_KASAN_EXTRA
compile time.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
+CONFIG KERNEL_KASAN_VMALLOC
+ bool "Back mappings in vmalloc space with real shadow memory"
+ depends on KERNEL_KASAN
+ By default, the shadow region for vmalloc space is the read-only
+ zero page. This means that KASAN cannot detect errors involving
+ vmalloc space.
+
+ Enabling this option will hook in to vmap/vmalloc and back those
+ mappings with real shadow memory allocated on demand. This allows
+ for KASAN to detect more sorts of errors (and to support vmapped
+ stacks), but at the cost of higher memory usage.
+
+ This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't
+ depend on that in here, so it is possible that enabling this
+ will have no effect.
+
if KERNEL_KASAN
config KERNEL_KASAN_GENERIC
def_bool y