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: <c0cf2c2fefaed36fbb68d682f2fc368607f90da8.camel@linux.intel.com>
Date: Fri, 29 Aug 2025 05:19:33 -0700
From: srinivas pandruvada <srinivas.pandruvada@...ux.intel.com>
To: David Arcari <darcari@...hat.com>, platform-driver-x86@...r.kernel.org
Cc: Hans de Goede <hansg@...nel.org>, Ilpo Järvinen
 <ilpo.jarvinen@...ux.intel.com>, Peter Zijlstra <peterz@...radead.org>,
 Ingo Molnar <mingo@...nel.org>, Dan Carpenter <dan.carpenter@...aro.org>,
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Tero Kristo
 <tero.kristo@...ux.intel.com>,  linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] platform/x86/intel: power-domains: Use
 topology_logical_package_id() for package ID

On Fri, 2025-08-29 at 07:38 -0400, David Arcari wrote:
> Currently, tpmi_get_logical_id() calls topology_physical_package_id()
> to set the pkg_id of the info structure. Since some VM hosts assign
> non
> contiguous package IDs, topology_physical_package_id() can return a
> larger value than topology_max_packages(). This will result in an
> invalid reference into tpmi_power_domain_mask[] as that is allocatead
> based on topology_max_packages() as the maximum package ID.
> 
> Fixes: 17ca2780458c ("platform/x86/intel: TPMI domain id and CPU
> mapping")
> Signed-off-by: David Arcari <darcari@...hat.com>
    Acked-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>

> ---
> v2: fixed underlying issue in tpmi_get_logcal_id() instead of
>     preventing access in tpmi_cpu_online().
> 
> Cc: Hans de Goede <hansg@...nel.org>
> Cc: "Ilpo Järvinen" <ilpo.jarvinen@...ux.intel.com>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Dan Carpenter <dan.carpenter@...aro.org>
> Cc: David Arcari <darcari@...hat.com>
> Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Cc: Tero Kristo <tero.kristo@...ux.intel.com>
> Cc: linux-kernel@...r.kernel.org
>  drivers/platform/x86/intel/tpmi_power_domains.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/intel/tpmi_power_domains.c
> b/drivers/platform/x86/intel/tpmi_power_domains.c
> index 9d8247bb9cfa..8641353b2e06 100644
> --- a/drivers/platform/x86/intel/tpmi_power_domains.c
> +++ b/drivers/platform/x86/intel/tpmi_power_domains.c
> @@ -178,7 +178,7 @@ static int tpmi_get_logical_id(unsigned int cpu,
> struct tpmi_cpu_info *info)
>  
>  	info->punit_thread_id = FIELD_GET(LP_ID_MASK, data);
>  	info->punit_core_id = FIELD_GET(MODULE_ID_MASK, data);
> -	info->pkg_id = topology_physical_package_id(cpu);
> +	info->pkg_id = topology_logical_package_id(cpu);
>  	info->linux_cpu = cpu;
>  
>  	return 0;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ