Patch "Revert "perf/core: Drop kernel samples even though :u is specified"" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
Revert "perf/core: Drop kernel samples even though :u is specified"
to the 4.9-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:
revert-perf-core-drop-kernel-samples-even-though-u-is-specified.patch
and it can be found in the queue-4.9 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
6a8a75f3235724c5941a33e287b2f98966ad14c5Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Tue, 11 Jul 2017 10:56:54 +0200
Subject: Revert "perf/core: Drop kernel samples even though :u is specified"
From: Ingo Molnar <[email protected]>
commit 6a8a75f3235724c5941a33e287b2f98966ad14c5 upstream.
This reverts commit cc1582c231ea041fbc68861dfaf957eaf902b829.
This commit introduced a regression that broke rr-project, which uses sampling events to receive a signal on overflow (but does not care about the contents of the sample). These signals are critical to the correct operation of rr.
There's been some back and forth about how to fix it - but to not keep applications in limbo queue up a revert.
--- kernel/events/core.c | 21 --------------------- 1 file changed, 21 deletions(-)
kernel/events/core.c +0 -21
@@ -7088,21 +7088,6 @@ static void perf_log_itrace_start(structperf_output_end (&handle); } -static bool sample_is_allowed (struct perf_event *event,struct pt_regs *regs) -{ -/* -* Due to interrupt latency (AKA "skid"), we may enter the -* kernel before taking an overflow, even if the PMU is only -* counting user events. -* To avoid leaking information to userspace, we must always -* reject kernel samples when exclude_kernel is set. -*/ -if (event->attr.exclude_kernel && !user_mode (regs)) -return false; - -return true; -} -/* * Generic event overflow handling, sampling. */
@@ -7150,12 +7135,6 @@ static int __perf_event_overflow(struct }/* -* For security, drop the skid kernel samples if necessary. -*/ -if (!sample_is_allowed (event, regs)) -return ret; - -/* * XXX event_limit might not quite work as expected on inherited * events */
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/x86-ioapic-pass-the-correct-data-to-unmask_ioapic_irq.patch queue-4.9/x86-acpi-prevent-out-of-bound-access-caused-by-broken-acpi-tables.patch queue-4.9/revert-perf-core-drop-kernel-samples-even-though-u-is-specified.patch