summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrey Ryabinin <aryabinin@virtuozzo.com>2016-04-28 16:18:55 -0700
committerAmit Pundir <amit.pundir@linaro.org>2018-01-22 13:15:43 +0530
commit928e92557326799be24ed4d45f348dd7d37f9ca8 (patch)
tree55dac593910e9aff43d05845582962a2328bece3 /kernel
parent318c10553b7ca7308138d878aecd98d6483a7b91 (diff)
UPSTREAM: kcov: don't profile branches in kcov
Profiling 'if' statements in __sanitizer_cov_trace_pc() leads to unbound recursion and crash: __sanitizer_cov_trace_pc() -> ftrace_likely_update -> __sanitizer_cov_trace_pc() ... Define DISABLE_BRANCH_PROFILING to disable this tracer. Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Bug: 64145065 (cherry-picked from 36f05ae8bce904b4c8105363e6227a79d343bda6) Change-Id: I53cea027ba86b89016df3944374bdb119a2ca9dd Signed-off-by: Paul Lawrence <paullawrence@google.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kcov.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/kcov.c b/kernel/kcov.c
index 78bed7125515..a02f2dddd1d7 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -1,5 +1,6 @@
#define pr_fmt(fmt) "kcov: " fmt
+#define DISABLE_BRANCH_PROFILING
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/file.h>