mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
![Andrey Konovalov](/assets/img/avatar_default.png)
KASAN is incompatible with some kernel debugging/tracing features. There's been multiple patches that disable those feature for some of KASAN files one by one. Instead of prolonging that, disable these features for all KASAN files at once. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Leon Romanovsky <leonro@mellanox.com> Link: http://lkml.kernel.org/r/29bd753d5ff5596425905b0b07f51153e2345cc1.1589297433.git.andreyknvl@google.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
29 lines
1.4 KiB
Makefile
29 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
KASAN_SANITIZE := n
|
|
UBSAN_SANITIZE := n
|
|
KCOV_INSTRUMENT := n
|
|
|
|
# Disable ftrace to avoid recursion.
|
|
CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_generic.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_generic_report.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_quarantine.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_tags.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_tags_report.o = $(CC_FLAGS_FTRACE)
|
|
|
|
# Function splitter causes unnecessary splits in __asan_load1/__asan_store1
|
|
# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533
|
|
CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
|
|
CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
|
|
CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
|
|
CFLAGS_init.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
|
|
CFLAGS_quarantine.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
|
|
CFLAGS_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
|
|
CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
|
|
CFLAGS_tags_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
|
|
|
|
obj-$(CONFIG_KASAN) := common.o init.o report.o
|
|
obj-$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o
|
|
obj-$(CONFIG_KASAN_SW_TAGS) += tags.o tags_report.o
|