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: <62c8c3910e1becf49e96eddf892d7c37960c7c28.camel@linux.intel.com>
Date: Tue, 10 Feb 2026 09:53:19 -0800
From: srinivas pandruvada <srinivas.pandruvada@...ux.intel.com>
To: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>,
  "Rafael J . Wysocki"	 <rafael@...nel.org>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 0/2] Fix RAPL PMU access from non-lead CPUs

On Mon, 2026-02-09 at 15:43 -0800, Kuppuswamy Sathyanarayanan wrote:
> This series fixes issues with RAPL PMU event access when using CPUs
> other than the package lead_cpu.
> 
> The problem was discovered when turbostat reported zero power values
> when run on a non-lead CPU in the package.
> 
> Investigation revealed two issues:
> 
> 1. The RAPL MSR driver incorrectly validated that the current CPU
> must
>    match the lead CPU of the package when reading from PMU context,
> even
>    though package-scoped MSRs are readable from any CPU in the
> package.
> 
> 2. The RAPL PMU cpumask only exposed one CPU per package (the
> lead_cpu)
>    for both MSR and TPMI interfaces, forcing tools to use that
> specific
>    CPU even though package-scoped registers are readable from any CPU
>    in the package.
> 
> The perf tool avoided issue #1 by checking the cpumask before opening
> events, but turbostat does not perform this validation. The
> restrictive
> cpumask in issue #2 was unnecessary since both MSR and TPMI
> interfaces
> support reads from any CPU in the package for package-scoped
> registers.
> 
> These patches:
> - Remove the incorrect CPU validation check in PMU context
> - Expand the PMU cpumask to include all CPUs in each package for both
>   MSR and TPMI RAPL interfaces
> - Rename 'atomic' parameter to 'pmu_ctx' for clarity
> 
> After these changes, tools can successfully read RAPL events from any
> CPU in the package, matching the architectural capability of the
> hardware for both MSR and TPMI based RAPL implementations.
> 
> Testing (PTL & GNR platform):
> - Verified turbostat --no-msr --show power works on all CPUs
> - Verified perf stat -e power/energy-pkg/ works on all CPUs
> - Confirmed /sys/bus/event_source/devices/power/cpumask shows all
>   package CPUs instead of just lead_cpu
> - Tested on both MSR-based (PTL) and TPMI-based (GNR) RAPL system
> 
> Kuppuswamy Sathyanarayanan (2):
>   powercap: intel_rapl: Remove incorrect CPU check in PMU context
>   powercap: intel_rapl: Expose all package CPUs in PMU cpumask
> 

Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>


>  drivers/powercap/intel_rapl_common.c | 21 ++++++++-------------
>  drivers/powercap/intel_rapl_msr.c    | 12 +++++-------
>  include/linux/intel_rapl.h           |  2 +-
>  3 files changed, 14 insertions(+), 21 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ