linux/arch/x86/events/amd
Adam Borowski 0a25556f84 perf/x86/amd: Set the size of event map array to PERF_COUNT_HW_MAX
The entry for PERF_COUNT_HW_REF_CPU_CYCLES is not used on AMD, but is
referenced by filter_events() which expects undefined events to have a
value of 0.

Found via KASAN:

  UBSAN: Undefined behaviour in arch/x86/events/amd/core.c:132:30
  index 9 is out of range for type 'u64 [9]'
  UBSAN: Undefined behaviour in arch/x86/events/amd/core.c:132:9
  load of address ffffffff81c021c8 with insufficient space for an object of type 'const u64'

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
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>
Link: http://lkml.kernel.org/r/1461749731-30979-1-git-send-email-kilobyte@angband.pl
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-28 10:20:25 +02:00
..
core.c perf/x86/amd: Set the size of event map array to PERF_COUNT_HW_MAX 2016-04-28 10:20:25 +02:00
ibs.c perf/x86/amd/ibs: Fix pmu::stop() nesting 2016-03-31 09:54:08 +02:00
iommu.c perf/x86/amd: Add support for new IOMMU performance events 2016-03-21 09:35:28 +01:00
iommu.h
power.c perf/x86/amd/power: Add AMD accumulated power reporting mechanism 2016-03-21 09:37:15 +01:00
uncore.c Merge branch 'perf/urgent' into perf/core, to queue up dependent patch 2016-02-17 10:37:36 +01:00