linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] kasan: consistently disable debugging features
@ 2020-05-12 15:33 Andrey Konovalov
  2020-05-12 15:33 ` [PATCH 2/3] kasan: move kasan_report() into report.c Andrey Konovalov
  2020-05-12 15:33 ` [PATCH 3/3] kasan: add missing functions declarations to kasan.h Andrey Konovalov
  0 siblings, 2 replies; 9+ messages in thread
From: Andrey Konovalov @ 2020-05-12 15:33 UTC (permalink / raw)
  To: Andrew Morton, Andrey Ryabinin
  Cc: Alexander Potapenko, Dmitry Vyukov, kasan-dev, linux-mm,
	linux-kernel, Leon Romanovsky, Andrey Konovalov

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.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 mm/kasan/Makefile | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile
index 08b43de2383b..434d503a6525 100644
--- a/mm/kasan/Makefile
+++ b/mm/kasan/Makefile
@@ -1,23 +1,28 @@
 # SPDX-License-Identifier: GPL-2.0
 KASAN_SANITIZE := n
-UBSAN_SANITIZE_common.o := n
-UBSAN_SANITIZE_generic.o := n
-UBSAN_SANITIZE_generic_report.o := n
-UBSAN_SANITIZE_tags.o := 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
-- 
2.26.2.645.ge9eca65c58-goog



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-28 15:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 15:33 [PATCH 1/3] kasan: consistently disable debugging features Andrey Konovalov
2020-05-12 15:33 ` [PATCH 2/3] kasan: move kasan_report() into report.c Andrey Konovalov
2020-05-12 16:42   ` Leon Romanovsky
2020-05-28 13:49   ` Qian Cai
2020-05-28 14:33     ` Josh Poimboeuf
2020-05-28 14:55       ` Peter Zijlstra
2020-05-28 15:00     ` Andrey Konovalov
2020-05-12 15:33 ` [PATCH 3/3] kasan: add missing functions declarations to kasan.h Andrey Konovalov
2020-05-12 16:41   ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).