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: <20170529091253.lopsd33qticsbgii@hirez.programming.kicks-ass.net>
Date:   Mon, 29 May 2017 11:12:53 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Alexei Starovoitov <ast@...com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Brendan Gregg <bgregg@...flix.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Teng Qin <qinteng@...com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 net-next 1/3] perf, bpf: Add BPF support to all
 perf_event types

On Thu, May 25, 2017 at 10:55:47PM -0700, Alexei Starovoitov wrote:

> +++ b/kernel/bpf/arraymap.c
> @@ -462,26 +462,22 @@ static void *perf_event_fd_array_get_ptr(struct bpf_map *map,
>  
>  	event = perf_file->private_data;
>  	ee = ERR_PTR(-EINVAL);
> +	/* Per-task events are not supported */
> +	if (event->attach_state & PERF_ATTACH_TASK)
> +		goto err_out;
>  
>  	attr = perf_event_attrs(event);
>  	if (IS_ERR(attr) || attr->inherit)
>  		goto err_out;

> +	/* TRACEPOINT and BREAKPOINT not supported in perf_event_read_local */

I cannot find reason for this comment. That is, why would
perf_event_read_local() not support those two types?

> +	if (attr->type == PERF_TYPE_TRACEPOINT ||
> +	    attr->type == PERF_TYPE_BREAKPOINT)
> +		goto err_out;
>  
> +	ee = bpf_event_entry_gen(perf_file, map_file);
> +	if (ee)
> +		return ee;
> +	ee = ERR_PTR(-ENOMEM);
>  
>  err_out:
>  	fput(perf_file);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ