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] [day] [month] [year] [list]
Date:	Thu, 2 Dec 2010 23:32:17 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	LKML <linux-kernel@...r.kernel.org>
cc:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH] perf: Prevent buildid collection running forever

On Thu, 2 Dec 2010, Thomas Gleixner wrote:

> Collecting the buildids after a long perf run can result in running
> forever.
> 
> The reason is that the perf_ops which buildids uses are not having the
> .comm function set. Sounds weird, but the way how perf fork/mmap
> handling works explains it:
> 
> On fork the new task in perf userspace inherits the registered memory
> maps of the parent. This is almost correct (it's ignoring
> MADV_DONTFORK) for threads and forks. For new processes the extra
> "comm" event is generated which then removes the parent mappings from
> the child. The buildid code ignores the comm event and therefor the
> parents mappings are kept. When tracing e.g. a kernel compile then the
> inherited process chain can be pretty long and every child gets the
> old and partially replaced mappings of the various ancestors, which
> leads to an endless shuffling in map_groups__fixup_overlappings()
> 
> Add the default comm event for now to "fix" this.

<REMOVE THIS>

> The real fix is to transport this information at clone/fork time with
> the event, which is easy as the kernel knows it already. That would
> avoid that whole inherit/clone/remove heuristics in the postprocessing
> tools.

</REMOVE THIS>

Gah. I confused myself. Grr. commit 4385d580f2 explains the magic, but
we really should have done the explicit PERF_RECORD_EXEC or at least
made the .comm thing mandatory.

It's so fricking non obvious that the map flush happens in
thread__set_comm(). 

Yours grumpy

      tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ