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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130831194602.GM3871@linux.vnet.ibm.com>
Date:	Sat, 31 Aug 2013 12:46:02 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>
Subject: Re: [RFC][PATCH 05/18 v2] ftrace: Do not display non safe RCU
 functions in available_filter_functions

On Sat, Aug 31, 2013 at 01:11:22AM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
> 
> As available_filter_functions file displays functions that are generally
> available for tracing, do not show the ones that are RCU unsafe. Otherwise
> it may be confusing for perf users to see these functions in this file but
> not be able to trace them.
> 
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> ---
>  include/linux/ftrace.h |    1 +
>  kernel/trace/ftrace.c  |    6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 1d17a82..4709264 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -411,6 +411,7 @@ enum {
>  	FTRACE_ITER_DO_HASH	= (1 << 3),
>  	FTRACE_ITER_HASH	= (1 << 4),
>  	FTRACE_ITER_ENABLED	= (1 << 5),
> +	FTRACE_ITER_NO_UNSAFE	= (1 << 6),
>  };
> 
>  void arch_ftrace_update_code(int command);
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 06504b2..be87ac9 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -2645,7 +2645,10 @@ t_next(struct seq_file *m, void *v, loff_t *pos)
>  		     !ftrace_lookup_ip(ops->notrace_hash, rec->ip)) ||
> 
>  		    ((iter->flags & FTRACE_ITER_ENABLED) &&
> -		     !(rec->flags & FTRACE_FL_ENABLED))) {
> +		     !(rec->flags & FTRACE_FL_ENABLED)) ||
> +

OK, I'll bite...  Why the blank line?

							Thanx, Paul

> +		    ((iter->flags & FTRACE_ITER_NO_UNSAFE) &&
> +		     ftrace_lookup_ip(ftrace_unsafe_rcu, rec->ip))) {
> 
>  			rec = NULL;
>  			goto retry;
> @@ -2773,6 +2776,7 @@ ftrace_avail_open(struct inode *inode, struct file *file)
>  	iter = __seq_open_private(file, &show_ftrace_seq_ops, sizeof(*iter));
>  	if (iter) {
>  		iter->pg = ftrace_pages_start;
> +		iter->flags = FTRACE_ITER_NO_UNSAFE;
>  		iter->ops = &global_ops;
>  	}
> 
> -- 
> 1.7.10.4
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ