* Patch "perf/x86: Reject non sampling events with precise_ip" has been added to the 4.9-stable tree
@ 2017-07-03 11:53 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-03 11:53 UTC (permalink / raw)
To: jolsa, acme, acme, alexander.levin, alexander.shishkin, eranian,
gregkh, jolsa, mingo, peterz, tglx, torvalds, vince,
vincent.weaver
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
perf/x86: Reject non sampling events with precise_ip
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:
perf-x86-reject-non-sampling-events-with-precise_ip.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 <stable@vger.kernel.org> know about it.
>From foo@baz Mon Jul 3 13:33:55 CEST 2017
From: Jiri Olsa <jolsa@redhat.com>
Date: Tue, 3 Jan 2017 15:24:54 +0100
Subject: perf/x86: Reject non sampling events with precise_ip
From: Jiri Olsa <jolsa@redhat.com>
[ Upstream commit 18e7a45af91acdde99d3aa1372cc40e1f8142f7b ]
As Peter suggested [1] rejecting non sampling PEBS events,
because they dont make any sense and could cause bugs
in the NMI handler [2].
[1] http://lkml.kernel.org/r/20170103094059.GC3093@worktop
[2] http://lkml.kernel.org/r/1482931866-6018-3-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vince@deater.net>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/20170103142454.GA26251@krava
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/events/core.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -505,6 +505,10 @@ int x86_pmu_hw_config(struct perf_event
if (event->attr.precise_ip > precise)
return -EOPNOTSUPP;
+
+ /* There's no sense in having PEBS for non sampling events: */
+ if (!is_sampling_event(event))
+ return -EINVAL;
}
/*
* check that PEBS LBR correction does not conflict with
Patches currently in stable-queue which might be from jolsa@redhat.com are
queue-4.9/perf-x86-reject-non-sampling-events-with-precise_ip.patch
queue-4.9/perf-probe-fix-to-probe-on-gcc-generated-functions-in-modules.patch
queue-4.9/perf-core-fix-sys_perf_event_open-vs.-hotplug.patch
queue-4.9/perf-x86-intel-uncore-fix-hardcoded-socket-0-assumption-in-the-haswell-init-code.patch
queue-4.9/perf-probe-fix-to-show-correct-locations-for-events-on-modules.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-03 11:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 11:53 Patch "perf/x86: Reject non sampling events with precise_ip" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox