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: <0f335f76-1a76-4964-9dd4-0491fe4bcf91@linux.intel.com>
Date: Thu, 29 Feb 2024 13:18:26 -0800
From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
 hdegoede@...hat.com, markgross@...nel.org, ilpo.jarvinen@...ux.intel.com,
 andriy.shevchenko@...ux.intel.com
Cc: platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] platform/x86: ISST: Allow reading core-power state on HWP
 disabled systems


On 2/28/24 4:26 PM, Srinivas Pandruvada wrote:
> When HWP (Hardware P-states) is disabled, dynamic SST features are
> disabled. But user should still be able to read the current core-power
> state, with legacy P-states. This will allow users to read current
> configuration with static SST enabled from BIOS.
>
> To address this, do not call disable_dynamic_sst_features() when the
> request is for reading the state.
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> ---

Looks good to me.

Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>

>  drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> index 2662fbbddf0c..1d918000d72b 100644
> --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> @@ -462,10 +462,10 @@ static long isst_if_core_power_state(void __user *argp)
>  	struct tpmi_per_power_domain_info *power_domain_info;
>  	struct isst_core_power core_power;
>  
> -	if (disable_dynamic_sst_features())
> +	if (copy_from_user(&core_power, argp, sizeof(core_power)))
>  		return -EFAULT;
>  
> -	if (copy_from_user(&core_power, argp, sizeof(core_power)))
> +	if (core_power.get_set && disable_dynamic_sst_features())
>  		return -EFAULT;
>  
>  	power_domain_info = get_instance(core_power.socket_id, core_power.power_domain_id);

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ