lkml.org 
[lkml]   [2016]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: UBSAN: Undefined behaviour in arch/x86/events/intel/p6.c:115:29
> I think UBSAN has correctly identified a bug.  I looked at the code in
> v4.6. In file arch/x86/events/core.c, in the function
> filter_events(), there is a loop starting at line 1554 that should go
> over 10 event counters. But in file arch/x86/events/intel/p6.c, only
> 8 event counters have been declared at line 9.
>
> I have a fix but do not for sure if its reasonable. I think we should
> pass on the max_events for the pmu to filter_events() function and
> change the loop condition accordingly. Can you apply the patch below
> and test again? It compiles, but I have not tested it.

Seems to work - warning is gone, everythins is detected as before.

--
Meelis Roos (mroos@linux.ee)

\
 
 \ /
  Last update: 2016-05-19 10:01    [W:0.054 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site