[PATCH 2/2] kernel: add missing KASAN config symbols

Hauke Mehrtens hauke at hauke-m.de
Sun Nov 7 06:11:36 PST 2021


On 11/3/21 7:08 PM, Stijn Tintel wrote:
> 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 <stijn at linux-ipv6.be>

Acked-by: Hauke Mehrtens <hauke at hauke-m.de>

> ---
>   config/Config-kernel.in          | 7 +++++++
>   target/linux/generic/config-5.10 | 1 +
>   2 files changed, 8 insertions(+)
> 
> diff --git a/config/Config-kernel.in b/config/Config-kernel.in
> index 6758d278e7..902e211ea1 100644
> --- a/config/Config-kernel.in
> +++ b/config/Config-kernel.in
> @@ -170,6 +170,13 @@ config KERNEL_KASAN_EXTRA
>   	  compile time.
>   	  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
>   
> +if KERNEL_KASAN

The other if conditions have an empty line around the if and endif

> +	config KERNEL_KASAN_GENERIC
> +	def_bool y
> +
> +	config KERNEL_KASAN_SW_TAGS
> +	def_bool n
> +endif
>   
>   choice
>   	prompt "Instrumentation type"
> diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
> index 83004d0879..ddcf083a7d 100644
> --- a/target/linux/generic/config-5.10
> +++ b/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
> 




More information about the openwrt-devel mailing list