[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1363011474.12608.12.camel@gandalf.local.home>
Date: Mon, 11 Mar 2013 10:17:54 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "zhangwei(Jovi)" <jovi.zhangwei@...wei.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...ux.intel.com>
Subject: Re: [PATCH 11/13] tracing: export syscall_nr_to_meta function
On Mon, 2013-03-11 at 15:14 +0800, zhangwei(Jovi) wrote:
> Currently syscall meta table is important for kernel
> syscall tracing, even mandatory, external modules may need this
> meta info when perform syscall tracing(like ktap), so export it.
>
> Instead of export variable syscalls_metadata, export function
> syscall_nr_to_meta is more safe.
>
> Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@...wei.com>
> ---
> include/trace/syscall.h | 2 ++
> kernel/trace/trace_syscalls.c | 3 ++-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/trace/syscall.h b/include/trace/syscall.h
> index 84bc419..3d88f63 100644
> --- a/include/trace/syscall.h
> +++ b/include/trace/syscall.h
> @@ -31,4 +31,6 @@ struct syscall_metadata {
> struct ftrace_event_call *exit_event;
> };
>
> +struct syscall_metadata *syscall_nr_to_meta(int nr);
> +
> #endif /* _TRACE_SYSCALL_H */
> diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
> index d24a84c..63433f9 100644
> --- a/kernel/trace/trace_syscalls.c
> +++ b/kernel/trace/trace_syscalls.c
> @@ -102,13 +102,14 @@ find_syscall_meta(unsigned long syscall)
> return NULL;
> }
>
> -static struct syscall_metadata *syscall_nr_to_meta(int nr)
> +struct syscall_metadata *syscall_nr_to_meta(int nr)
If you're going to make this global, then the name needs to be changed.
Perhaps call it trace_syscall_nr_to_metadata()
Anyway, this code may be totally rewritten in the near future, so
modules beware.
-- Steve
> {
> if (!syscalls_metadata || nr >= NR_syscalls || nr < 0)
> return NULL;
>
> return syscalls_metadata[nr];
> }
> +EXPORT_SYMBOL_GPL(syscall_nr_to_meta);
>
> static enum print_line_t
> print_syscall_enter(struct trace_iterator *iter, int flags,
--
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