kasan: disable the built-in 'memset' function
In function kasan_set_poison: { ... while (size--) { p[size] = value; } } This will optimize to 'memset' function when compile option > O2. But the memset must be instrument by kasan, so there is recursive Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
8a272511d5
commit
13a0682340
@ -25,6 +25,7 @@ if(CONFIG_MM_KASAN)
|
||||
list(APPEND SRCS generic.c)
|
||||
set_source_files_properties(generic.c PROPERTIES COMPILE_FLAGS
|
||||
-fno-sanitize=kernel-address)
|
||||
set_source_files_properties(generic.c PROPERTIES COMPILE_FLAGS -fno-builtin)
|
||||
set_source_files_properties(generic.c PROPERTIES COMPILE_FLAGS -fno-lto)
|
||||
endif()
|
||||
|
||||
|
@ -43,6 +43,8 @@ ifeq ($(CONFIG_MM_KASAN),y)
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS += -fno-builtin
|
||||
|
||||
# Add the core heap directory to the build
|
||||
|
||||
DEPPATH += --dep-path kasan
|
||||
|
Loading…
Reference in New Issue
Block a user