[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.20.1605191035340.28238@math.ut.ee>
Date: Thu, 19 May 2016 10:36:09 +0300 (EEST)
From: Meelis Roos <mroos@...ux.ee>
To: Nilay Vaish <nilayvaish@...il.com>
cc: Linux Kernel list <linux-kernel@...r.kernel.org>, x86@...nel.org
Subject: Re: 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@...ux.ee)
Powered by blists - more mailing lists