Kan Liang
e321d02db8
perf/x86: Disable extended registers for non-supported PMUs
The perf fuzzer caused Skylake machine to crash:
[ 9680.085831] Call Trace:
[ 9680.088301] <IRQ>
[ 9680.090363] perf_output_sample_regs+0x43/0xa0
[ 9680.094928] perf_output_sample+0x3aa/0x7a0
[ 9680.099181] perf_event_output_forward+0x53/0x80
[ 9680.103917] __perf_event_overflow+0x52/0xf0
[ 9680.108266] ? perf_trace_run_bpf_submit+0xc0/0xc0
[ 9680.113108] perf_swevent_hrtimer+0xe2/0x150
[ 9680.117475] ? check_preempt_wakeup+0x181/0x230
[ 9680.122091] ? check_preempt_curr+0x62/0x90
[ 9680.126361] ? ttwu_do_wakeup+0x19/0x140
[ 9680.130355] ? try_to_wake_up+0x54/0x460
[ 9680.134366] ? reweight_entity+0x15b/0x1a0
[ 9680.138559] ? __queue_work+0x103/0x3f0
[ 9680.142472] ? update_dl_rq_load_avg+0x1cd/0x270
[ 9680.147194] ? timerqueue_del+0x1e/0x40
[ 9680.151092] ? __remove_hrtimer+0x35/0x70
[ 9680.155191] __hrtimer_run_queues+0x100/0x280
[ 9680.159658] hrtimer_interrupt+0x100/0x220
[ 9680.163835] smp_apic_timer_interrupt+0x6a/0x140
[ 9680.168555] apic_timer_interrupt+0xf/0x20
[ 9680.172756] </IRQ>
The XMM registers can only be collected by PEBS hardware events on the
platforms with PEBS baseline support, e.g. Icelake, not software/probe
events.
Add capabilities flag PERF_PMU_CAP_EXTENDED_REGS to indicate the PMU
which support extended registers. For X86, the extended registers are
XMM registers.
Add has_extended_regs() to check if extended registers are applied.
The generic code define the mask of extended registers as 0 if arch
headers haven't overridden it.
Originally-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.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>
Fixes: 878068ea27 ("perf/x86: Support outputting XMM registers")
Link: https://lkml.kernel.org/r/1559081314-9714-1-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-06-24 19:19:23 +02:00
..
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:04 +02:00
2019-06-05 17:36:37 +02:00
2019-05-07 19:43:05 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-05-31 14:27:27 -07:00
2019-06-05 17:37:18 +02:00
2019-05-30 11:26:32 -07:00
2019-05-11 10:54:43 -04:00
2019-06-05 17:37:07 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:06 +02:00
2019-06-05 17:37:12 +02:00
2019-05-24 17:36:45 +02:00
2019-05-15 18:21:43 -07:00
2019-06-05 17:37:18 +02:00
2019-05-20 08:21:07 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-04-27 17:03:44 -04:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:29:22 -07:00
2019-06-05 17:37:18 +02:00
2019-05-30 11:29:22 -07:00
2019-06-05 17:37:17 +02:00
2019-05-24 17:27:13 +02:00
2019-06-05 17:37:15 +02:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:40 +02:00
2019-06-13 17:34:56 -10:00
2019-05-30 11:29:53 -07:00
2019-05-02 17:17:52 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:09 +02:00
2019-06-05 17:37:09 +02:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:16 +02:00
2019-06-05 17:30:29 +02:00
2019-06-05 17:37:05 +02:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:27:12 +02:00
2019-05-06 11:55:39 +02:00
2019-06-05 17:37:06 +02:00
2019-05-24 17:39:02 +02:00
2019-05-30 11:29:55 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:36:37 +02:00
2019-05-09 00:41:00 -05:00
2019-05-24 17:27:11 +02:00
2019-05-24 17:27:11 +02:00
2019-05-24 17:27:11 +02:00
2019-05-24 17:27:11 +02:00
2019-05-24 17:27:11 +02:00
2019-06-05 17:37:06 +02:00
2019-06-05 17:37:17 +02:00
2019-05-21 11:28:46 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:37:52 +02:00
2019-05-24 17:37:52 +02:00
2019-05-14 09:47:48 -07:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-14 19:52:50 -07:00
2019-05-23 10:25:26 -06:00
2019-05-30 11:26:41 -07:00
2019-05-14 19:52:49 -07:00
2019-05-23 10:25:26 -06:00
2019-04-30 16:12:02 -06:00
2019-05-04 07:24:08 -06:00
2019-05-23 10:25:26 -06:00
2019-05-24 17:36:45 +02:00
2019-04-27 09:07:04 -07:00
2019-05-30 11:29:53 -07:00
2019-04-12 13:54:58 -07:00
2019-05-30 11:29:53 -07:00
2019-04-30 16:11:59 -06:00
2019-04-09 17:05:46 -07:00
2019-05-07 08:39:02 -06:00
2019-06-14 17:46:14 -10:00
2019-05-31 10:38:58 -07:00
2019-05-15 13:21:37 -07:00
2019-04-25 08:19:15 -07:00
2019-06-05 17:36:37 +02:00
2019-05-14 19:52:48 -07:00
2019-05-09 15:25:13 -04:00
2019-05-30 11:25:18 -07:00
2019-05-30 11:26:35 -07:00
2019-05-18 15:52:26 -07:00
2019-04-25 22:00:16 +02:00
2019-04-25 22:00:17 +02:00
2019-05-24 17:27:11 +02:00
2019-04-25 21:33:37 +02:00
2019-04-25 21:33:37 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:39 -07:00
2019-06-05 17:36:37 +02:00
2019-06-03 12:02:03 +02:00
2019-05-10 12:20:36 +02:00
2019-06-15 10:00:29 +02:00
2019-04-10 00:32:34 +02:00
2019-05-14 19:52:50 -07:00
2019-05-24 17:27:11 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:53 -07:00
2019-05-20 15:02:08 -07:00
2019-05-24 17:27:11 +02:00
2019-05-07 21:28:04 -07:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:05 +02:00
2019-04-25 15:38:52 -04:00
2019-06-13 17:34:56 -10:00
2019-05-24 17:37:52 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:29:21 -07:00
2019-05-30 11:29:21 -07:00
2019-05-24 17:37:54 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:41 -07:00
2019-05-03 15:30:23 +01:00
2019-04-08 17:52:46 +02:00
2019-05-06 15:04:40 +02:00
2019-05-21 11:28:40 +02:00
2019-06-05 17:37:05 +02:00
2019-05-15 17:35:54 +01:00
2019-05-24 17:37:53 +02:00
2019-05-01 12:29:28 -04:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:35 -07:00
2019-04-16 10:01:24 +02:00
2019-04-13 19:08:22 -06:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:26:32 -07:00
2019-05-25 16:33:36 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-05-08 21:23:11 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-07 22:03:58 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:27:11 +02:00
2019-05-24 17:27:11 +02:00
2019-05-07 21:12:44 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-12 18:16:31 -04:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-05-24 17:27:12 +02:00
2019-05-13 15:08:16 -07:00
2019-05-13 15:08:16 -07:00
2019-05-15 16:05:47 -07:00
2019-06-13 17:34:56 -10:00
2019-06-01 15:51:32 -07:00
2019-04-22 09:48:12 -06:00
2019-05-14 09:47:47 -07:00
2019-05-30 11:29:53 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:06 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:36:38 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:37 -07:00
2019-05-21 11:28:39 +02:00
2019-05-14 09:47:44 -07:00
2019-05-14 09:47:48 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:05 +02:00
2019-04-16 13:08:16 +02:00
2019-05-21 11:28:39 +02:00
2019-05-21 11:28:39 +02:00
2019-05-21 11:28:39 +02:00
2019-05-21 11:28:39 +02:00
2019-05-21 11:28:39 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:55 -07:00
2019-04-26 13:02:11 +02:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:05 +02:00
2019-05-30 11:26:41 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:35 -07:00
2019-04-12 12:52:38 -05:00
2019-05-01 07:47:37 -07:00
2019-06-05 17:37:06 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-14 19:52:52 -07:00
2019-05-30 11:26:32 -07:00
2019-05-01 10:41:38 +01:00
2019-05-01 10:49:17 +01:00
2019-05-24 17:36:45 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-05-24 17:37:52 +02:00
2019-04-08 22:56:14 +02:00
2019-05-30 11:26:35 -07:00
2019-04-29 08:29:20 +02:00
2019-05-30 11:26:32 -07:00
2019-05-14 19:52:49 -07:00
2019-06-05 17:37:16 +02:00
2019-05-24 17:27:11 +02:00
2019-05-30 11:26:32 -07:00
2019-05-24 17:27:11 +02:00
2019-05-24 17:36:45 +02:00
2019-06-05 17:37:06 +02:00
2019-05-24 17:36:45 +02:00
2019-04-25 22:06:10 +02:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-14 19:52:48 -07:00
2019-05-15 23:39:38 +02:00
2019-05-14 19:52:49 -07:00
2019-05-30 11:29:22 -07:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:07 +02:00
2019-05-21 11:28:46 +02:00
2019-05-24 17:39:02 +02:00
2019-06-05 17:36:38 +02:00
2019-05-06 10:19:19 -06:00
2019-04-18 16:18:27 -04:00
2019-06-01 15:51:31 -07:00
2019-05-14 19:52:49 -07:00
2019-05-16 15:55:48 -07:00
2019-05-21 11:28:45 +02:00
2019-06-05 17:37:06 +02:00
2019-05-06 13:50:15 -07:00
2019-05-30 11:26:32 -07:00
2019-05-24 17:37:53 +02:00
2019-05-07 20:17:51 -07:00
2019-04-23 10:40:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-13 09:23:18 -04:00
2019-04-18 17:42:54 -07:00
2019-05-30 11:26:32 -07:00
2019-06-13 17:34:56 -10:00
2019-05-14 09:47:50 -07:00
2019-05-14 09:47:49 -07:00
2019-06-13 17:34:56 -10:00
2019-06-05 17:36:38 +02:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:45 +02:00
2019-05-30 11:26:41 -07:00
2019-05-14 09:47:46 -07:00
2019-05-14 19:52:48 -07:00
2019-06-07 13:09:06 -07:00
2019-05-14 09:47:49 -07:00
2019-05-14 19:52:48 -07:00
2019-05-14 10:55:54 -07:00
2019-05-07 21:50:24 +09:00
2019-05-24 17:27:10 +02:00
2019-05-19 10:58:45 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:36:38 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-04-08 23:01:42 +02:00
2019-05-06 01:18:58 +02:00
2019-04-26 16:11:54 -04:00
2019-04-25 14:18:14 -04:00
2019-04-25 14:18:15 -04:00
2019-05-30 11:26:41 -07:00
2019-04-12 20:09:34 -04:00
2019-04-25 16:51:42 +02:00
2019-05-14 17:19:47 +02:00
2019-04-25 19:43:12 +02:00
2019-06-05 17:37:16 +02:00
2019-06-05 17:37:16 +02:00
2019-05-01 14:26:36 -05:00
2019-05-24 17:27:11 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:30:29 +02:00
2019-05-16 10:29:00 -07:00
2019-05-03 10:49:17 -04:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:39 -07:00
2019-05-14 09:47:51 -07:00
2019-05-30 11:29:19 -07:00
2019-04-23 16:38:09 -05:00
2019-04-25 16:33:07 -05:00
2019-04-15 13:24:02 +01:00
2019-04-15 13:24:02 +01:00
2019-05-27 10:55:08 +02:00
2019-06-05 17:37:07 +02:00
2019-05-21 10:50:45 +02:00
2019-06-24 19:19:23 +02:00
2019-06-24 19:19:23 +02:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2019-05-07 14:31:03 +02:00
2019-04-26 11:09:55 -07:00
2019-05-30 11:29:52 -07:00
2019-06-05 17:37:16 +02:00
2019-05-21 11:28:45 +02:00
2019-06-05 17:37:07 +02:00
2019-06-05 17:37:16 +02:00
2019-06-05 17:37:16 +02:00
2019-04-10 12:13:31 +05:30
2019-06-05 17:37:16 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:36:45 +02:00
2019-05-14 19:52:48 -07:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:29:54 -07:00
2019-06-05 17:37:04 +02:00
2019-05-30 11:26:32 -07:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-14 19:52:51 -07:00
2019-04-18 16:44:05 +02:00
2019-05-30 11:26:41 -07:00
2019-05-14 19:52:48 -07:00
2019-05-14 19:52:48 -07:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:06 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:37 +02:00
2019-05-14 19:52:48 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-17 10:08:59 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-06-03 13:26:20 -07:00
2019-05-14 19:52:51 -07:00
2019-05-30 11:29:21 -07:00
2019-06-05 17:36:37 +02:00
2019-05-16 09:45:20 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-08 22:14:36 +02:00
2019-05-21 11:28:46 +02:00
2019-05-21 11:28:46 +02:00
2019-04-10 10:56:06 +02:00
2019-06-05 17:37:06 +02:00
2019-05-07 12:47:47 -03:00
2019-05-14 19:52:48 -07:00
2019-05-30 11:29:52 -07:00
2019-05-24 17:39:00 +02:00
2019-05-30 11:26:32 -07:00
2019-05-07 20:17:51 -07:00
2019-04-30 16:11:57 -06:00
2019-04-19 15:09:10 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:41 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-04-30 12:37:56 +02:00
2019-04-19 09:46:04 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-16 15:51:55 -07:00
2019-05-30 11:29:19 -07:00
2019-04-24 12:17:08 +02:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:36:45 +02:00
2019-04-08 11:59:47 +01:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:37 -07:00
2019-04-29 12:37:57 +02:00
2019-06-05 17:37:05 +02:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:26:32 -07:00
2019-04-08 16:44:21 -06:00
2019-06-05 17:37:04 +02:00
2019-06-03 10:44:21 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:29:22 -07:00
2019-06-05 17:37:09 +02:00
2019-06-05 17:37:16 +02:00
2019-05-21 11:28:46 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-05-16 16:16:18 -07:00
2019-04-18 11:18:53 +03:00
2019-06-05 17:37:06 +02:00
2019-04-09 08:31:51 -07:00
2019-05-06 19:40:31 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:26:37 -07:00
2019-05-24 17:39:02 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:29:21 -07:00
2019-04-26 19:04:19 -07:00
2019-06-05 17:37:09 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:04 +02:00
2019-05-30 11:26:32 -07:00
2019-04-25 13:51:22 -04:00
2019-05-30 11:26:35 -07:00
2019-05-08 10:03:52 -07:00
2019-05-14 09:47:45 -07:00
2019-05-30 11:26:41 -07:00
2019-06-05 17:30:29 +02:00
2019-05-24 17:27:11 +02:00
2019-05-30 11:26:41 -07:00
2019-05-24 17:27:13 +02:00
2019-05-24 17:27:13 +02:00
2019-06-05 17:30:27 +02:00
2019-04-08 17:05:52 -04:00
2019-05-12 13:11:36 -04:00
2019-05-24 17:39:00 +02:00
2019-06-05 17:37:05 +02:00
2019-05-18 15:52:26 -07:00
2019-05-14 09:47:45 -07:00
2019-06-05 17:37:05 +02:00
2019-06-05 17:37:05 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:37 -07:00
2019-05-15 17:35:54 +01:00
2019-04-09 15:14:49 -06:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:26:41 -07:00
2019-05-24 17:36:47 +02:00