linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] stackleak: Disable ftrace for stackleak.c
@ 2018-11-10 22:05 Alexander Popov
  2018-11-10 23:30 ` Steven Rostedt
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Popov @ 2018-11-10 22:05 UTC (permalink / raw)
  To: kernel-hardening, Kees Cook, Jann Horn, Ingo Molnar,
	Andy Lutomirski, Joerg Roedel, Borislav Petkov, Thomas Gleixner,
	Dave Hansen, Steven Rostedt, Peter Zijlstra, Jan Kara,
	Mathieu Desnoyers, Dan Williams, Masahiro Yamada,
	Masami Hiramatsu, x86, alex.popov, linux-kernel

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


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

end of thread, other threads:[~2018-11-13 18:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-10 22:05 [PATCH 1/1] stackleak: Disable ftrace for stackleak.c Alexander Popov
2018-11-10 23:30 ` 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

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).