lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <41F4E192-ABD1-41BF-9BAE-45E78DD719B3@fb.com>
Date:   Mon, 4 Feb 2019 19:33:06 +0000
From:   Song Liu <songliubraving@...com>
To:     lkml <linux-kernel@...r.kernel.org>
CC:     Kernel Team <Kernel-team@...com>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Jiri Olsa <jolsa@...hat.com>,
        David Carrillo Cisneros <davidca@...com>
Subject: Re: [PATCH] perf utils: silent "Couldn't synthesize bpf events"
 warning for EPERM



> On Feb 4, 2019, at 11:31 AM, Song Liu <songliubraving@...com> wrote:
> 
> Synthesizing BPF events is only supported for root. Silent warning msg
> when non-root user runs perf-record.
> 
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Jiri Olsa <jolsa@...hat.com>
> Reported-by: David Carrillo-Cisneros <davidca@...com>
> Tested-by: David Carrillo-Cisneros <davidca@...com>
> Signed-off-by: Song Liu <songliubraving@...com>
> ---
> tools/perf/util/bpf-event.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c
> index 796ef793f4ce..62dda96b0096 100644
> --- a/tools/perf/util/bpf-event.c
> +++ b/tools/perf/util/bpf-event.c
> @@ -236,8 +236,8 @@ int perf_event__synthesize_bpf_events(struct perf_tool *tool,
> 			pr_debug("%s: can't get next program: %s%s",
> 				 __func__, strerror(errno),
> 				 errno == EINVAL ? " -- kernel too old?" : "");
> -			/* don't report error on old kernel */
> -			err = (errno == EINVAL) ? 0 : -1;
> +			/* don't report error on old kernel or EPERM  */
> +			err = (errno == EINVAL || errno == EPERM) ? 0 : -1;
> 			break;
> 		}
> 		fd = bpf_prog_get_fd_by_id(id);
> -- 
> 2.17.1
> 

CC David. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ