Peter Zijlstra
f2fa49f50b
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:06:52 +02:00
..
2018-03-24 10:58:48 +01:00
2018-01-10 09:27:11 +01:00
2018-04-24 09:32:05 +02:00
2018-04-13 19:50:15 +02:00
2016-10-07 15:23:45 +02:00
2017-12-20 10:05:00 +01:00
2017-03-31 09:49:53 +02:00
2017-01-12 11:22:48 +01:00
2018-04-08 11:51:57 +02:00
2017-03-31 09:49:53 +02:00
2016-09-24 10:07:44 +02:00
2018-03-24 10:58:45 +01:00
2016-09-24 10:07:43 +02:00
2016-12-15 08:49:23 -08:00
2017-05-25 14:30:16 +02:00
2016-09-24 10:07:43 +02:00
2018-04-24 09:32:10 +02:00
2018-02-16 20:09:47 +01:00
2017-04-12 12:38:34 +02:00
2018-02-16 20:09:46 +01:00
2018-04-24 09:32:03 +02:00
2018-04-24 09:32:11 +02:00
2018-05-16 10:06:46 +02:00
2016-09-24 10:07:44 +02:00
2018-03-03 10:19:45 +01:00
2018-04-13 19:50:20 +02:00
2017-06-26 07:13:11 +02:00
2018-04-24 09:32:08 +02:00
2015-11-11 09:16:10 -08:00
2018-05-16 10:06:52 +02:00
2018-02-16 20:09:47 +01:00