[Devel,RHEL7,COMMIT] ms/kcov: don't profile branches in kcov

Submitted by Konstantin Khorenko on Nov. 28, 2016, 10:12 a.m.

Details

Message ID 201611281012.uASACuZW002268@finist_cl7.x64_64.work.ct
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko Nov. 28, 2016, 10:12 a.m.
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.20.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.36.1.vz7.20.4
------>
commit 7129d9ebc998136cd2551b6fe1a13d6fabdf9aab
Author: Andrey Ryabinin <aryabinin@virtuozzo.com>
Date:   Mon Nov 28 14:12:56 2016 +0400

    ms/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>
    
    https://jira.sw.ru/browse/PSBM-56169
    
    (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
 
+#define DISABLE_BRANCH_PROFILING
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <linux/file.h>