From: Meelis Roos <mroos@linux.ee>
To: Nilay Vaish <nilayvaish@gmail.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>, x86@kernel.org
Subject: Re: UBSAN: Undefined behaviour in arch/x86/events/intel/p6.c:115:29
Date: Thu, 19 May 2016 10:36:09 +0300 (EEST) [thread overview]
Message-ID: <alpine.LRH.2.20.1605191035340.28238@math.ut.ee> (raw)
In-Reply-To: <CACbG3084SVkW4r+-RqkbZR=BUH2_fK0bnDqKNXQoRffSJtpTYQ@mail.gmail.com>
> 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)
prev parent reply other threads:[~2016-05-19 7:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 18:41 Meelis Roos
2016-05-18 18:08 ` Nilay Vaish
2016-05-19 7:36 ` Meelis Roos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.20.1605191035340.28238@math.ut.ee \
--to=mroos@linux.ee \
--cc=linux-kernel@vger.kernel.org \
--cc=nilayvaish@gmail.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®