From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
kernel test robot <oliver.sang@intel.com>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [peterz-queue:perf/core] [perf/x86/rapl] 90942140bb: UBSAN:array-index-out-of-bounds_in_arch/x86/events/rapl.c
Date: Wed, 11 Sep 2024 10:35:19 -0400 [thread overview]
Message-ID: <7730b925-eb2c-4908-9c48-e016701f2901@linux.intel.com> (raw)
In-Reply-To: <20240911094536.GP4723@noisy.programming.kicks-ass.net>
On 2024-09-11 5:45 a.m., Peter Zijlstra wrote:
> On Wed, Sep 11, 2024 at 04:32:13PM +0800, kernel test robot wrote:
>>
>>
>> Hello,
>>
>> kernel test robot noticed "UBSAN:array-index-out-of-bounds_in_arch/x86/events/rapl.c" on:
>>
>> commit: 90942140bb6cc7e9a41d5927c7617ee522896f7a ("perf/x86/rapl: Move the pmu allocation out of CPU hotplug")
>> https://git.kernel.org/cgit/linux/kernel/git/peterz/queue.git perf/core
>>
>> in testcase: boot
>>
>> compiler: clang-18
>> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>>
>> (please refer to attached dmesg/kmsg for entire log/backtrace)
>>
>>
>> +-----------------------------------------------------------+------------+------------+
>> | | c206df6d69 | 90942140bb |
>> +-----------------------------------------------------------+------------+------------+
>> | UBSAN:array-index-out-of-bounds_in_arch/x86/events/rapl.c | 0 | 12 |
>> +-----------------------------------------------------------+------------+------------+
>>
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <oliver.sang@intel.com>
>> | Closes: https://lore.kernel.org/oe-lkp/202409111521.c7c6d56f-lkp@intel.com
>>
>>
>> [ 22.115286][ T1] ------------[ cut here ]------------
>> [ 22.115957][ T1] UBSAN: array-index-out-of-bounds in arch/x86/events/rapl.c:685:3
>
> That is:
>
> rapl_pmus->pmus[topology_logical_die_id(cpu)] = pmu;
>
> Which is scaled like:
>
> int nr_rapl_pmu = topology_max_packages() * topology_max_dies_per_package();
>
> And that isn't new in that patch, just moved around.
>
The error commit is still the old one which doesn't include the fix of
the issue reported by Dhananjay.
https://lore.kernel.org/lkml/88fa2064-c054-4833-872c-0cf5ff1e3609@amd.com/
I think it should be the same issue.
> Kan, as it happens these two patches got zapped by Ingo because they
> conflict with that rapl patch from perf/urgent and he merged perf/urgent
> into perf/core.
>
> I was going to rebase these two patches on top, but given the above, can
> you have a look instead?
>
>
Sure, I will work with Oliver on the issue, and resend the patch to
support rapl.
Thanks,
Kan
prev parent reply other threads:[~2024-09-11 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 8:32 [peterz-queue:perf/core] [perf/x86/rapl] 90942140bb: UBSAN:array-index-out-of-bounds_in_arch/x86/events/rapl.c kernel test robot
2024-09-11 9:45 ` Peter Zijlstra
2024-09-11 14:35 ` Liang, Kan [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=7730b925-eb2c-4908-9c48-e016701f2901@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
--cc=oliver.sang@intel.com \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).