From: Alexander Popov <alex.popov@linux.com>
To: kernel-hardening@lists.openwall.com,
Kees Cook <keescook@chromium.org>, Jann Horn <jannh@google.com>,
Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
Joerg Roedel <joro@8bytes.org>, Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>, Jan Kara <jack@suse.cz>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Dan Williams <dan.j.williams@intel.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
x86@kernel.org, alex.popov@linux.com,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] stackleak: Disable ftrace for stackleak.c
Date: Sun, 11 Nov 2018 01:05:30 +0300 [thread overview]
Message-ID: <1541887530-16610-1-git-send-email-alex.popov@linux.com> (raw)
The stackleak_erase() function is called on the trampoline stack at the
end of syscall. This stack is not big enough for ftrace operations,
e.g. it can be overflowed if we enable kprobe_events for stackleak_erase().
Let's disable ftrace for stackleak.c to avoid such situations.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Alexander Popov <alex.popov@linux.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
---
kernel/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/Makefile b/kernel/Makefile
index 7343b3a..0906f6d 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -18,6 +18,7 @@ obj-$(CONFIG_MULTIUSER) += groups.o
ifdef CONFIG_FUNCTION_TRACER
# Do not trace internal ftrace files
CFLAGS_REMOVE_irq_work.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_stackleak.o = $(CC_FLAGS_FTRACE)
endif
# Prevents flicker of uninteresting __do_softirq()/__local_bh_disable_ip()
--
2.7.4
next reply other threads:[~2018-11-10 22:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 22:05 Alexander Popov [this message]
2018-11-10 23:30 ` [PATCH 1/1] stackleak: Disable ftrace for stackleak.c Steven Rostedt
2018-11-11 10:19 ` Alexander Popov
2018-11-12 1:53 ` Steven Rostedt
2018-11-12 2:50 ` Masami Hiramatsu
2018-11-12 14:53 ` Mathieu Desnoyers
2018-11-12 16:52 ` Steven Rostedt
2018-11-12 16:51 ` Alexander Popov
2018-11-12 17:21 ` Steven Rostedt
2018-11-13 18:21 ` Masami Hiramatsu
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=1541887530-16610-1-git-send-email-alex.popov@linux.com \
--to=alex.popov@linux.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=jack@suse.cz \
--cc=jannh@google.com \
--cc=joro@8bytes.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.com \
/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