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:	Fri, 12 Feb 2016 22:34:44 +0800
From:	pi3orama <pi3orama@....com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Wang Nan <wangnan0@...wei.com>,
	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>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/54] perf tools: Support setting different slots in a BPF map separately



发自我的 iPhone

> 在 2016年2月12日,下午10:23,Jiri Olsa <jolsa@...hat.com> 写道:
> 
> On Fri, Feb 05, 2016 at 02:01:39PM +0000, Wang Nan wrote:
> 
> SNIP
> 
>> 
>> +int parse_events__merge_arrays(struct parse_events_array *dest,
>> +                   struct parse_events_array *another)
>> +{
>> +    struct parse_events_array new;
>> +
>> +    if (!dest || !another)
>> +        return -EINVAL;
>> +
>> +    new.nr_ranges = dest->nr_ranges + another->nr_ranges;
>> +    new.ranges = malloc(sizeof(new.ranges[0]) * new.nr_ranges);
>> +    if (!new.ranges)
>> +        return -ENOMEM;
>> +
>> +    memcpy(&new.ranges[0], dest->ranges,
>> +           sizeof(new.ranges[0]) * dest->nr_ranges);
>> +    memcpy(&new.ranges[dest->nr_ranges], another->ranges,
>> +           sizeof(new.ranges[0]) * another->nr_ranges);
>> +    free(dest->ranges);
>> +    free(another->ranges);
>> +    *dest = new;
>> +    return 0;
>> +}
> 
> is there a user for this function in this patchset? can't find it..
> 
> I recall I've already seen it in earlier versions, but can't find it now ;-)
> 

Sorry, I should remove this function. It
is designed to be used in patch 15, but
I found it require more code if use this
function, so instead patch 15 does the
merging inline, makes this function useless.

Thank you.

> jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ