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: NMeelis Roos <mroos@linux.ee> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Tested-by: NMeelis Roos <mroos@linux.ee>
Showing
想要评论请 注册 或 登录