[Devel,rh7,3/4] ms/kcov: don't profile branches in kcov

Submitted by Andrey Ryabinin on Oct. 14, 2016, 12:01 p.m.


Message ID 1476446489-4316-3-git-send-email-aryabinin@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Andrey Ryabinin Oct. 14, 2016, 12:01 p.m.
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>

(cherry picked from commit 36f05ae8bce904b4c8105363e6227a79d343bda6)
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
 kernel/kcov.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/kernel/kcov.c b/kernel/kcov.c
index f963fca..91b00e6 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -1,5 +1,6 @@ 
 #define pr_fmt(fmt) "kcov: " fmt
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <linux/file.h>