Skip to contentSkip to conversation

Patch "perf: Fix inherited events vs. tracepoint filters" has been added to the 3.10-stable tree

PATCH [email protected] 1 participant 1 message Feb 24, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

perf: Fix inherited events vs. tracepoint filters

to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
perf-fix-inherited-events-vs.-tracepoint-filters.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From b71b437eedaed985062492565d9d421d975ae845 Mon Sep 17 00:00:00 2001

From: Peter Zijlstra <[email protected]>
Date: Mon, 2 Nov 2015 10:50:51 +0100
Subject: perf: Fix inherited events vs. tracepoint filters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Peter Zijlstra <[email protected]>

commit b71b437eedaed985062492565d9d421d975ae845 upstream.

Arnaldo reported that tracepoint filters seem to misbehave (ie. not apply) on inherited events.

The fix is obvious; filters are only set on the actual (parent) event, use the normal pattern of using this parent event for filters. This is safe because each child event has a reference to it.

---
 kernel/events/core.c |    4 ++++
 1 file changed, 4 insertions(+)
kernel/events/core.c +4 -0
@@ -5639,6 +5639,10 @@ static int perf_tp_filter_match(struct p
 {
 	void *record = data->raw->data;
 
+	/* only top level events have filters set */
+	if (event->parent)
+		event = event->parent;
+
 	if (likely(!event->filter) || filter_match_preds(event->filter, record))
 		return 1;
 	return 0;

Patches currently in stable-queue which might be from [email protected] are

queue-3.10/x86-asm-irq-stop-relying-on-magic-jmp-behavior-for-early_idt_handlers.patch queue-3.10/futex-drop-refcount-if-requeue_pi-acquired-the-rtmutex.patch queue-3.10/perf-fix-inherited-events-vs.-tracepoint-filters.patch