]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Fix potential out-of-bounds access
authorPeter Zijlstra <peterz@infradead.org>
Fri, 6 Dec 2019 11:50:16 +0000 (12:50 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 17 Dec 2019 12:32:46 +0000 (13:32 +0100)
commit5b9a6d41fb01123063dcd760daa9a5d69138cffe
tree8eeccf5d120c1eb9346e1959225383a02c3f69d7
parentec837c23c179df66340c3c40aca0f7dedea4e3b0
perf/x86: Fix potential out-of-bounds access

UBSAN reported out-of-bound accesses for x86_pmu.event_map(), it's
arguments should be < x86_pmu.max_events. Make sure all users observe
this constraint.

Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Meelis Roos <mroos@linux.ee>
arch/x86/events/core.c