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]
Date:	Tue, 23 Feb 2016 18:23:46 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	Alexei Starovoitov <ast@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Brendan Gregg <brendan.d.gregg@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Cody P Schafer <dev@...yps.com>,
	"David S. Miller" <davem@...emloft.net>,
	He Kuang <hekuang@...wei.com>,
	Jérémie Galarneau 
	<jeremie.galarneau@...icios.com>, Jiri Olsa <jolsa@...nel.org>,
	Kirill Smelkov <kirr@...edi.com>,
	Li Zefan <lizefan@...wei.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>, pi3orama@....com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/48] perf data: Support converting data from
 bpf_perf_event_output()

On Mon, Feb 22, 2016 at 09:10:38AM +0000, Wang Nan wrote:

SNIP

> ---
>  tools/perf/util/data-convert-bt.c | 112 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 111 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> index b722e57..70f462d 100644
> --- a/tools/perf/util/data-convert-bt.c
> +++ b/tools/perf/util/data-convert-bt.c
> @@ -352,6 +352,84 @@ static int add_tracepoint_values(struct ctf_writer *cw,
>  	return ret;
>  }
>  
> +static int
> +add_bpf_output_values(struct bt_ctf_event_class *event_class,
> +		      struct bt_ctf_event *event,
> +		      struct perf_sample *sample)
> +{
> +	struct bt_ctf_field_type *len_type, *seq_type;
> +	struct bt_ctf_field *len_field, *seq_field;
> +	unsigned int raw_size = sample->raw_size;
> +	unsigned int nr_elements = raw_size / sizeof(u32);
> +	unsigned int i;
> +	int ret;
> +
> +	if (nr_elements * sizeof(u32) != raw_size)

could this be IS_ALIGNED(raw_size, u32)

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ