ifdef [31mCONFIG_KASAN[0m ifdef [31mCONFIG_KASAN_INLINE[0m call_threshold := 10000 else call_threshold := 0 endif KASAN_SHADOW_OFFSET ?= $([31mCONFIG_KASAN_SHADOW_OFFSET[0m) CFLAGS_KASAN_MINIMAL := -fsanitize=kernel-address CFLAGS_KASAN := $(call cc-option, -fsanitize=kernel-address \ -fasan-shadow-offset=$(KASAN_SHADOW_OFFSET) \ --param asan-stack=1 --param asan-globals=1 \ --param asan-instrumentation-with-call-threshold=$(call_threshold)) ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),) ifneq ($([31mCONFIG_COMPILE_TEST[0m),y) $(warning Cannot use [31mCONFIG_KASAN[0m: \ -fsanitize=kernel-address is not supported by compiler) endif else ifeq ($(CFLAGS_KASAN),) ifneq ($([31mCONFIG_COMPILE_TEST[0m),y) $(warning [31mCONFIG_KASAN[0m: compiler does not support all options.\ Trying minimal configuration) endif CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL) endif endif CFLAGS_KASAN += $(call cc-option, -fsanitize-address-use-after-scope) endif |