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:	Wed, 6 Jul 2016 20:16:52 +0800
From:	"Wangnan (F)" <wangnan0@...wei.com>
To:	Jiri Olsa <jolsa@...hat.com>
CC:	<acme@...nel.org>, <linux-kernel@...r.kernel.org>,
	<pi3orama@....com>, <lizefan@...wei.com>,
	He Kuang <hekuang@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Nilay Vaish <nilayvaish@...il.com>
Subject: Re: [PATCH v13 2/8] perf evlist: Introduce aux evlist



On 2016/7/6 19:36, Jiri Olsa wrote:
> On Mon, Jul 04, 2016 at 06:20:03AM +0000, Wang Nan wrote:
>
> SNIP
>
>> +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent)
>> +{
>> +	struct perf_evlist *evlist;
>> +
>> +	if (perf_evlist__is_aux(parent)) {
>> +		pr_err("Internal error: create aux evlist from another aux evlist\n");
>> +		return NULL;
>> +	}
>> +
>> +	evlist = zalloc(sizeof(*evlist));
>> +	if (!evlist)
>> +		return NULL;
>> +
>> +	perf_evlist__init(evlist, parent->cpus, parent->threads);
>> +	evlist->parent = parent;
>> +	INIT_LIST_HEAD(&evlist->list);
>> +	list_add(&evlist->list, &parent->children);
> I understand there's some reason for separating maps with and
> without overwrite set, but I'm missing it.. why is that?

You are asking overwrite, not write_backward?

Overwrite mapping needs to be mapped without PROT_WRITE, so its
control page is also read only, so perf_evlist__mmap_consume() is
not able to use, and there's no way to tell kernel to where we have
read. Kernel overwrite old records when its full. Compare with normal
mapping: perf uses perf_evlist__mmap_consume() to tell kernel the
last byte it has read, so kernel stop writing data to it when it full,
and issues LOST event. This is the reason we need to separate maps
with and without overwrite set.

For write backward: kernel write data in different direction, so
requires map separation.

Thank you.

> thanks,
> jirka


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ