lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 16 Oct 2016 17:16:08 +0200
From:   Vegard Nossum <vegard.nossum@...cle.com>
To:     linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Jiri Slaby <jslaby@...e.cz>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        "Luis R . Rodriguez" <mcgrof@...nel.org>,
        Vegard Nossum <vegard.nossum@...cle.com>,
        Steven Rostedt <srostedt@...hat.com>
Subject: [PATCH 04/12] tracing: declare __{start,stop}_{annotated_,}branch_profile as external array

Cc: Steven Rostedt <srostedt@...hat.com>
Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
---
 kernel/trace/trace_branch.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c
index 3a2a737..47d78fd 100644
--- a/kernel/trace/trace_branch.c
+++ b/kernel/trace/trace_branch.c
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 2008 Steven Rostedt <srostedt@...hat.com>
  */
+#include <linux/extarray.h>
 #include <linux/kallsyms.h>
 #include <linux/seq_file.h>
 #include <linux/spinlock.h>
@@ -218,8 +219,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect)
 }
 EXPORT_SYMBOL(ftrace_likely_update);
 
-extern unsigned long __start_annotated_branch_profile[];
-extern unsigned long __stop_annotated_branch_profile[];
+DECLARE_EXTARRAY(unsigned long, annotated_branch_profile);
 
 static int annotated_branch_stat_headers(struct seq_file *m)
 {
@@ -273,7 +273,7 @@ static int branch_stat_show(struct seq_file *m, void *v)
 
 static void *annotated_branch_stat_start(struct tracer_stat *trace)
 {
-	return __start_annotated_branch_profile;
+	return ext_start(annotated_branch_profile);
 }
 
 static void *
@@ -283,7 +283,7 @@ annotated_branch_stat_next(void *v, int idx)
 
 	++p;
 
-	if ((void *)p >= (void *)__stop_annotated_branch_profile)
+	if ((void *)p >= (void *)ext_end(annotated_branch_profile))
 		return NULL;
 
 	return p;
@@ -347,8 +347,7 @@ fs_initcall(init_annotated_branch_stats);
 
 #ifdef CONFIG_PROFILE_ALL_BRANCHES
 
-extern unsigned long __start_branch_profile[];
-extern unsigned long __stop_branch_profile[];
+DECLARE_EXTARRAY(unsigned long, branch_profile);
 
 static int all_branch_stat_headers(struct seq_file *m)
 {
@@ -363,7 +362,7 @@ static int all_branch_stat_headers(struct seq_file *m)
 
 static void *all_branch_stat_start(struct tracer_stat *trace)
 {
-	return __start_branch_profile;
+	return ext_start(branch_profile);
 }
 
 static void *
@@ -373,7 +372,7 @@ all_branch_stat_next(void *v, int idx)
 
 	++p;
 
-	if ((void *)p >= (void *)__stop_branch_profile)
+	if ((void *)p >= (void *)ext_end(branch_profile))
 		return NULL;
 
 	return p;
-- 
2.10.0.479.g221bd91

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ