From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Vince Weaver <vincent.weaver-e7X0jjDqjFGHXe+LvDLADg@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch] perf_event_open.2 -- clarify EACCES and EPERM errors
Date: Wed, 16 Apr 2014 07:52:30 +0200 [thread overview]
Message-ID: <534E1A9E.5080105@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1404151425470.15528-6xBS8L8d439fDsnSvq7Uq4Se7xf15W0s1dQoKJhdanU@public.gmane.org>
On 04/15/2014 08:28 PM, Vince Weaver wrote:
>
> Attempt to clarify the reasons for EACCES and EPERM errors.
Thanks, Vince. Applied.
Cheers,
Michael
> Signed-off-by: Vince Weaver <vincent.weaver-e7X0jjDqjFGHXe+LvDLADg@public.gmane.org>
>
> diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
> index e513905..00842df 100644
> --- a/man2/perf_event_open.2
> +++ b/man2/perf_event_open.2
> @@ -2385,11 +2385,14 @@ field is overwritten by the kernel to be the size of the structure
> it was expecting.
> .TP
> .B EACCES
> -Returned when the requested event requires root permissions
> -(or a more permissive perf_event paranoid setting).
> -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;
> +Returned when the requested event requires
> +.B CAP_SYS_ADMIN
> +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;
> and not setting
> .I exclude_kernel
> when the paranoid setting requires it.
> @@ -2477,9 +2480,17 @@ branch tracing if it is not available, sampling if no PMU
> interrupt is available, and branch stacks for software events.
> .TP
> .B EPERM
> -Returned if sufficient permissions not available to create the event.
> -This includes attempting to set a breakpoint on a kernel address
> -and setting a ftrace function trace tracepoint.
> +Returned on many (but not all) architectures when an unsupported
> +.IR exclude_hv ", " exclude_idle ", " exclude_user ", or " exclude_kernel
> +setting is specified.
> +
> +It can also happen, as with
> +.BR EACCES ,
> +when the requested event requires
> +.B CAP_SYS_ADMIN
> +permissions (or a more permissive perf_event paranoid setting).
> +This includes setting a breakpoint on a kernel address,
> +and (since Linux 3.13) setting a kernel function-trace tracepoint.
> .TP
> .B ESRCH
> Returned if attempting to attach to a process that does not exist.
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-04-16 5:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 18:28 [patch] perf_event_open.2 -- clarify EACCES and EPERM errors Vince Weaver
[not found] ` <alpine.DEB.2.10.1404151425470.15528-6xBS8L8d439fDsnSvq7Uq4Se7xf15W0s1dQoKJhdanU@public.gmane.org>
2014-04-16 5:52 ` Michael Kerrisk (man-pages) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=534E1A9E.5080105@gmail.com \
--to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vincent.weaver-e7X0jjDqjFGHXe+LvDLADg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.