lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7730b925-eb2c-4908-9c48-e016701f2901@linux.intel.com>
Date: Wed, 11 Sep 2024 10:35:19 -0400
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>,
 kernel test robot <oliver.sang@...el.com>
Cc: oe-lkp@...ts.linux.dev, lkp@...el.com, linux-perf-users@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [peterz-queue:perf/core] [perf/x86/rapl] 90942140bb:
 UBSAN:array-index-out-of-bounds_in_arch/x86/events/rapl.c



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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ