Blame view
scripts/Makefile.kasan
934 Bytes
0b24becc8 kasan: add kernel... |
1 2 3 4 5 6 |
ifdef CONFIG_KASAN ifdef CONFIG_KASAN_INLINE call_threshold := 10000 else call_threshold := 0 endif |
39d114ddc arm64: add KASAN ... |
7 |
KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET) |
0b24becc8 kasan: add kernel... |
8 9 10 |
CFLAGS_KASAN_MINIMAL := -fsanitize=kernel-address CFLAGS_KASAN := $(call cc-option, -fsanitize=kernel-address \ |
39d114ddc arm64: add KASAN ... |
11 |
-fasan-shadow-offset=$(KASAN_SHADOW_OFFSET) \ |
bebf56a1b kasan: enable ins... |
12 |
--param asan-stack=1 --param asan-globals=1 \ |
0b24becc8 kasan: add kernel... |
13 14 15 |
--param asan-instrumentation-with-call-threshold=$(call_threshold)) ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),) |
6e54abac1 kasan: Makefile: ... |
16 |
ifneq ($(CONFIG_COMPILE_TEST),y) |
0b24becc8 kasan: add kernel... |
17 18 |
$(warning Cannot use CONFIG_KASAN: \ -fsanitize=kernel-address is not supported by compiler) |
6e54abac1 kasan: Makefile: ... |
19 |
endif |
0b24becc8 kasan: add kernel... |
20 21 |
else ifeq ($(CFLAGS_KASAN),) |
6e54abac1 kasan: Makefile: ... |
22 23 24 25 |
ifneq ($(CONFIG_COMPILE_TEST),y) $(warning CONFIG_KASAN: compiler does not support all options.\ Trying minimal configuration) endif |
0b24becc8 kasan: add kernel... |
26 27 28 29 |
CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL) endif endif endif |