Peter Zijlstra
70e65f281a
perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map()
...
commit 46b1b577229a091b137831becaa0fae8690ee15a upstream.
> arch/x86/events/intel/cstate.c:307 cstate_pmu_event_init() warn: potential spectre issue 'pkg_msr' (local cap)
> arch/x86/events/intel/core.c:337 intel_pmu_event_map() warn: potential spectre issue 'intel_perfmon_event_map'
> arch/x86/events/intel/knc.c:122 knc_pmu_event_map() warn: potential spectre issue 'knc_perfmon_event_map'
> arch/x86/events/intel/p4.c:722 p4_pmu_event_map() warn: potential spectre issue 'p4_general_events'
> arch/x86/events/intel/p6.c:116 p6_pmu_event_map() warn: potential spectre issue 'p6_perfmon_event_map'
> arch/x86/events/amd/core.c:132 amd_pmu_event_map() warn: potential spectre issue 'amd_perfmon_event_map'
Userspace controls @attr, sanitize @attr->config before passing it on
to x86_pmu::event_map().
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
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 <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-16 10:08:45 +02:00
..
2018-03-24 11:00:25 +01:00
2018-01-10 09:29:53 +01:00
2018-05-09 09:50:19 +02:00
2018-05-16 10:08:42 +02:00
2016-10-07 21:38:00 -07:00
2017-12-20 10:07:32 +01:00
2017-03-31 10:31:46 +02:00
2017-01-12 11:39:24 +01:00
2018-04-08 12:12:45 +02:00
2017-03-31 10:31:46 +02:00
2016-10-07 18:46:30 -07:00
2018-03-24 11:00:20 +01:00
2016-10-19 08:31:25 -07:00
2018-02-25 11:05:47 +01:00
2017-05-25 15:44:46 +02:00
2016-10-11 23:38:39 -07:00
2018-04-29 11:31:56 +02:00
2018-02-17 13:21:20 +01:00
2017-04-12 12:41:14 +02:00
2018-02-17 13:21:19 +01:00
2018-04-20 08:20:40 +02:00
2018-05-16 10:08:42 +02:00
2018-05-09 09:50:24 +02:00
2016-10-19 08:39:47 -07:00
2018-03-03 10:23:27 +01:00
2018-04-13 19:48:27 +02:00
2017-06-24 07:11:18 +02:00
2018-04-24 09:34:13 +02:00
2016-10-11 15:06:32 -07:00
2018-05-16 10:08:45 +02:00
2018-02-28 10:18:30 +01:00
2016-10-15 10:03:15 -07:00