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: <alpine.LFD.2.00.1012031245220.2653@localhost6.localdomain6>
Date:	Fri, 3 Dec 2010 12:51:03 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Arnaldo Carvalho de Melo <acme@...radead.org>
cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ian Munsie <imunsie@....ibm.com>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [GIT PULL 0/4] perf/core improvements

On Thu, 2 Dec 2010, Arnaldo Carvalho de Melo wrote:
> Em Fri, Dec 03, 2010 at 12:00:09AM +0100, Thomas Gleixner escreveu:
> > Investigating. Please wait
> 
> Thanks, as I said on IRC, perhaps I neglected the non-perf bits of perf

It's a perf bit of perf. You simply broke the inheritance
code. Testing perf with something more complex than "sleep 1" might
have shown this :)

------------>

Subject: perf: Fix event inherit fallout of precalculated headers
From: Thomas Gleixner <tglx@...utronix.de>
Date: Fri, 03 Dec 2010 11:42:10 +0100

The precalculated header size is not updated when an event is inherited. That
results in bogus sample entries for all child events.

Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 kernel/perf_event.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: linux-2.6-tip/kernel/perf_event.c
===================================================================
--- linux-2.6-tip.orig/kernel/perf_event.c
+++ linux-2.6-tip/kernel/perf_event.c
@@ -6184,6 +6184,12 @@ inherit_event(struct perf_event *parent_
 	child_event->overflow_handler = parent_event->overflow_handler;
 
 	/*
+	 * Precalculate sample_data sizes
+	 */
+	perf_event__header_size(child_event);
+	perf_event__id_header_size(child_event);
+
+	/*
 	 * Link it up in the child's context:
 	 */
 	raw_spin_lock_irqsave(&child_ctx->lock, flags);
--
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