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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240911094536.GP4723@noisy.programming.kicks-ass.net>
Date: Wed, 11 Sep 2024 11:45:36 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: kernel test robot <oliver.sang@...el.com>
Cc: Kan Liang <kan.liang@...ux.intel.com>, 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 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.

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?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ