From: Anders Roxell <anders.roxell@linaro.org>
To: aryabinin@virtuozzo.com
Cc: kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@redhat.com, Anders Roxell <anders.roxell@linaro.org>
Subject: [PATCH] mm: kasan: mark file report so ftrace doesn't trace it
Date: Mon, 3 Jun 2019 11:11:48 +0200 [thread overview]
Message-ID: <20190603091148.24898-1-anders.roxell@linaro.org> (raw)
__kasan_report() triggers ftrace and the preempt_count() in ftrace
causes a call to __asan_load4(), breaking the circular dependency by
making report as no trace for ftrace.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
mm/kasan/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile
index 08b43de2383b..2b2da731483c 100644
--- a/mm/kasan/Makefile
+++ b/mm/kasan/Makefile
@@ -3,12 +3,14 @@ KASAN_SANITIZE := n
UBSAN_SANITIZE_common.o := n
UBSAN_SANITIZE_generic.o := n
UBSAN_SANITIZE_generic_report.o := n
+UBSAN_SANITIZE_report.o := n
UBSAN_SANITIZE_tags.o := n
KCOV_INSTRUMENT := n
CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE)
CFLAGS_REMOVE_generic.o = $(CC_FLAGS_FTRACE)
CFLAGS_REMOVE_generic_report.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE)
CFLAGS_REMOVE_tags.o = $(CC_FLAGS_FTRACE)
# Function splitter causes unnecessary splits in __asan_load1/__asan_store1
@@ -17,6 +19,7 @@ CFLAGS_REMOVE_tags.o = $(CC_FLAGS_FTRACE)
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_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
obj-$(CONFIG_KASAN) := common.o init.o report.o
--
2.20.1
next reply other threads:[~2019-06-03 9:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 9:11 Anders Roxell [this message]
2019-06-03 10:50 ` Dmitry Vyukov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190603091148.24898-1-anders.roxell@linaro.org \
--to=anders.roxell@linaro.org \
--cc=aryabinin@virtuozzo.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox