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]
Date:   Mon, 10 Oct 2022 11:22:51 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Fabien Parent <fabien.parent@...aro.org>
Cc:     ilia.lin@...nel.org, agross@...nel.org, bjorn.andersson@...aro.org,
        rafael@...nel.org, linux-pm@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] cpufreq: qcom: pass pvs_name size along with its
 buffer

On 01-10-22, 19:10, Fabien Parent wrote:
> @@ -265,7 +269,7 @@ static int qcom_cpufreq_probe(struct platform_device *pdev)
>  	struct nvmem_cell *speedbin_nvmem;
>  	struct device_node *np;
>  	struct device *cpu_dev;
> -	char *pvs_name = "speedXX-pvsXX-vXX";
> +	char *pvs_name = PVS_NAME_TEMPLATE;
>  	unsigned cpu;
>  	const struct of_device_id *match;
>  	int ret;
> @@ -306,8 +310,8 @@ static int qcom_cpufreq_probe(struct platform_device *pdev)
>  			goto free_drv;
>  		}
>  
> -		ret = drv->data->get_version(cpu_dev,
> -							speedbin_nvmem, &pvs_name, drv);
> +		ret = drv->data->get_version(cpu_dev, speedbin_nvmem, &pvs_name,
> +					     sizeof(PVS_NAME_TEMPLATE), drv);

Since the pvs name is always PVS_NAME_TEMPLATE, why are we even
passing it and size here ? Why not directly use it in those
get_version() implementations directly ?

>  		if (ret) {
>  			nvmem_cell_put(speedbin_nvmem);
>  			goto free_drv;
> -- 
> 2.37.2

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ