On Wed, Apr 16, 2014 at 9:18 AM, walter harms <wharms@xxxxxx> wrote: > > > Am 15.04.2014 20:25, schrieb Vince Weaver: >> 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" >> > > why not "can monitor any process" ? Thanks for the heads-up, Walter. The wording *is* confusing, but I believe the fix is different from what you suspect: [[ @@ -2404,8 +2404,9 @@ permissions (or a more permissive perf_event paranoid setting). Some common cases where an unprivileged process may encounter this error: attaching to a process owned by a different user; -monitoring all processes (including those not belonging to the user) -on a given CPU; +monitoring all processes on a given CPU (i.e., specifying the +.I pid +argument as \-1); and not setting .I exclude_kernel when the paranoid setting requires it. ]] Cheers Michael -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html