Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1384051 > unrolled thread

[PATCH] kcov: disable tracing and branch profiling in kcov

Started byAndrey Ryabinin <aryabinin@virtuozzo.com>
First post2016-04-21 12:40 +0200
Last post2016-04-21 12:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] kcov: disable tracing and branch profiling in kcov Andrey Ryabinin <aryabinin@virtuozzo.com> - 2016-04-21 12:40 +0200

#1384051 — [PATCH] kcov: disable tracing and branch profiling in kcov

FromAndrey Ryabinin <aryabinin@virtuozzo.com>
Date2016-04-21 12:40 +0200
Subject[PATCH] kcov: disable tracing and branch profiling in kcov
Message-ID<rqkbE-7J8-3@gated-at.bofh.it>
Tracing of __sanitizer_cov_trace_pc() causes unbound recursion and crash,
because __sanitizer_cov_trace_pc() is also called from tracer code.
For the same reason we need to disable profiling of 'if' branches.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 kernel/kcov.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/kcov.c b/kernel/kcov.c
index 3efbee0..7919253 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>
@@ -43,7 +44,7 @@ struct kcov {
  * Entry point from instrumented code.
  * This is called once per basic-block/edge.
  */
-void __sanitizer_cov_trace_pc(void)
+notrace void __sanitizer_cov_trace_pc(void)
 {
 	struct task_struct *t;
 	enum kcov_mode mode;
-- 
2.7.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web