lkml.org 
[lkml]   [2014]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/3] perf: Disallow user space stack dump for function trace event
    Date
    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

    Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Vince Weaver <vincent.weaver@maine.edu>
    Cc: Steven Rostedt <rostedt@goodmis.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 */
    --
    1.8.3.1


    \
     
     \ /
      Last update: 2014-03-02 17:41    [W:3.336 / U:0.168 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site