lkml.org 
[lkml]   [2013]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: suspicious RCU usage (perf)
On Tue, Aug 27, 2013 at 02:16:29PM +0200, Peter Zijlstra wrote:
> On Mon, Aug 26, 2013 at 03:03:04PM -0400, Steven Rostedt wrote:
> > > Is there some path through sys_perf_open_event that might be
> > > missing a capability check perhaps ?
> > >
> >
> > That's a question for Ingo, Peter or Jiri.
>
> Its not something I've looked at recently, git blames Jiri and fweisbec
> for most of that code.
>
> Permission checks appear to live in
> kernel/trace/trace_event_perf.c:perf_trace_event_perm().

Actually the following condition is weird:

/* The ftrace function trace is allowed only for root. */
if (ftrace_event_is_function(tp_event) &&
perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN))
return -EPERM;

We probably intended to do:

/* The ftrace function trace is allowed only for root. */
if (ftrace_event_is_function(tp_event) ||
perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN))
return -EPERM;

Can somebody confirm?


\
 
 \ /
  Last update: 2013-08-30 18:21    [W:0.167 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site