[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140302115907.4c11bce5@gandalf.local.home>
Date: Sun, 2 Mar 2014 11:59:07 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
"H. Peter Anvin" <hpa@...or.com>,
Vince Weaver <vincent.weaver@...ne.edu>
Subject: Re: [PATCH 2/3] perf: Disallow user space stack dump for function
trace event
On Sun, 2 Mar 2014 16:56:39 +0100
Jiri Olsa <jolsa@...hat.com> wrote:
> Disabling user space stack dump for function trace event.
>
> Recent issues with user space callchains processing within
> page fault handler tracing showed as Peter said 'there's
> just too much fail surface'.
>
> The user space stack dump is just another source of the this issue.
>
> Related list discussions:
> http://marc.info/?t=139302086500001&r=1&w=2
> http://marc.info/?t=139301437300003&r=1&w=2
For Linux git change logs, it's more preferable to use the kernel.org
link (it may go to the same place, but at least kernel.org has more
control of where it goes in the future).
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1402211521040.6395@vincent-weaver-1.um.maine.edu
-- Steve
>
> Suggested-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
> Cc: H. Peter Anvin <hpa@...or.com>
> Cc: Vince Weaver <vincent.weaver@...ne.edu>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> ---
> kernel/trace/trace_event_perf.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
> index d5e01c3..c894614 100644
> --- a/kernel/trace/trace_event_perf.c
> +++ b/kernel/trace/trace_event_perf.c
> @@ -42,6 +42,13 @@ static int perf_trace_event_perm(struct ftrace_event_call *tp_event,
> */
> if (!p_event->attr.exclude_callchain_user)
> return -EINVAL;
> +
> + /*
> + * Same reason to disable user stack dump as for user space
> + * callchains above.
> + */
> + if (p_event->attr.sample_type & PERF_SAMPLE_STACK_USER)
> + return -EINVAL;
> }
>
> /* No tracing, just counting, so no obvious leak */
--
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