瀏覽代碼

kernel: add missing KASAN config symbols

Enabling KERNEL_KASAN exposes several missing symbols. As KASAN_SW_TAGS
is only implemented for arm64 CPUs and requires clang, it doesn't make
sense to make this a build option so just default to KASAN_GENERIC and
disable KASAN_SW_TAGS.

While at it, disable TEST_KASAN_MODULE in the generic 5.10 config.

Fixes build failures with KERNEL_KASAN enabled.

Signed-off-by: Stijn Tintel <[email protected]>
Acked-by: Hauke Mehrtens <[email protected]>
Stijn Tintel 4 年之前
父節點
當前提交
ec68c75c62
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 7 0
      config/Config-kernel.in
  2. 1 0
      target/linux/generic/config-5.10

+ 7 - 0
config/Config-kernel.in

@@ -147,6 +147,13 @@ config KERNEL_KASAN_EXTRA
 	  compile time.
 	  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
 
+if KERNEL_KASAN
+	config KERNEL_KASAN_GENERIC
+	def_bool y
+
+	config KERNEL_KASAN_SW_TAGS
+	def_bool n
+endif
 
 choice
 	prompt "Instrumentation type"

+ 1 - 0
target/linux/generic/config-5.10

@@ -6064,6 +6064,7 @@ CONFIG_TCP_CONG_CUBIC=y
 # CONFIG_TEST_HASH is not set
 # CONFIG_TEST_HEXDUMP is not set
 # CONFIG_TEST_IDA is not set
+# CONFIG_TEST_KASAN_MODULE is not set
 # CONFIG_TEST_KMOD is not set
 # CONFIG_TEST_KSTRTOX is not set
 # CONFIG_TEST_LIST_SORT is not set