Re: [patch] perf_event_open.2 -- expand ERRORS section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 14 Apr 2014, Michael Kerrisk (man-pages) wrote:

> 
>        EACCES Returned when the requested event requires root  permis‐
>               sions  (or  a  more  permissive perf_event paranoid set‐
>               ting).  Some common cases where an unprivileged  process
>               may  encounter  this  error:  are attaching to a process
>               owned by a different user; monitoring all processes on a
>               given CPU; and not setting exclude_kernel when the para‐
>               noid setting requires it.
> 
> But, now I have some more questions:
> 
> * What are "root permissions" here? It's these days usual to express
>   things precisely in terms of the required capability.

Yes, I guess that should really be CAP_SYS_ADMIN

> * I am puzzled by "monitoring all processes on a CPU"? So, monitoring 
>   _some_ (i.e., < all) processes on a CPU won't trigger this error?

I was a bit confused here.

A regular user can monitor "the specified process on CPU X" or "the 
specified process on any CPU".

A user running as root can also monitor "all procceses belonging to anyone 
on CPU X"

Other combinations aren't possible.

> >>> +.B EPERM
> >>> +Returned if sufficient permissions not available to create the event.
> 
> Again, somewhere here, the text should mention the required capability.

Yes, it's CAP_SYS_ADMIN again.

> > This is a recent change.  
> 
> So, the text should mention a kernel version number. Could you patch 
> that please. I guess it should be something like:
> 
>     and (since Linux 3.??) setting an ftrace function-trace tracepoint

Yes, I'll do that.

Vince

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux