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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86351lvcl9.wl-maz@kernel.org>
Date:   Tue, 18 Jul 2023 09:38:26 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Punit Agrawal <punit.agrawal@...edance.com>
Cc:     sudeep.holla@....com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, Vikram Sethi <vsethi@...dia.com>,
        Shanker Donthineni <sdonthineni@...dia.com>
Subject: Re: [PATCH] firmware: smccc: Fix use of uninitialised results structure

On Mon, 17 Jul 2023 18:17:02 +0100,
Punit Agrawal <punit.agrawal@...edance.com> wrote:
> 
> Commit 35727af2b15d ("irqchip/gicv3: Workaround for NVIDIA erratum
> T241-FABRIC-4") moved the initialisation of the SoC version to
> arm_smccc_version_init() but forgot to update the results structure
> and it's usage.
> 
> Fix the use of the uninitialised results structure and update the
> error strings.
> 
> Fixes: 35727af2b15d ("irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4")
> Signed-off-by: Punit Agrawal <punit.agrawal@...edance.com>
> Cc: Sudeep Holla <sudeep.holla@....com>
> Cc: Marc Zyngier <maz@...nel.org>
> Cc: Vikram Sethi <vsethi@...dia.com>
> Cc: Shanker Donthineni <sdonthineni@...dia.com>
> ---
>  drivers/firmware/smccc/soc_id.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/firmware/smccc/soc_id.c b/drivers/firmware/smccc/soc_id.c
> index 890eb454599a..1990263fbba0 100644
> --- a/drivers/firmware/smccc/soc_id.c
> +++ b/drivers/firmware/smccc/soc_id.c
> @@ -34,7 +34,6 @@ static struct soc_device_attribute *soc_dev_attr;
>  
>  static int __init smccc_soc_init(void)
>  {
> -	struct arm_smccc_res res;
>  	int soc_id_rev, soc_id_version;
>  	static char soc_id_str[20], soc_id_rev_str[12];
>  	static char soc_id_jep106_id_str[12];
> @@ -49,13 +48,13 @@ static int __init smccc_soc_init(void)
>  	}
>  
>  	if (soc_id_version < 0) {
> -		pr_err("ARCH_SOC_ID(0) returned error: %lx\n", res.a0);
> +		pr_err("Invalid SoC Version: %x\n", soc_id_version);
>  		return -EINVAL;
>  	}
>  
>  	soc_id_rev = arm_smccc_get_soc_id_revision();
>  	if (soc_id_rev < 0) {
> -		pr_err("ARCH_SOC_ID(1) returned error: %lx\n", res.a0);
> +		pr_err("Invalid SoC Revision: %x\n", soc_id_rev);
>  		return -EINVAL;
>  	}
>  

Ah, indeed. Well caught. FWIW:

Acked-by: Marc Zyngier <maz@...nel.org>

Sudeep, I assume you'll take that one directly?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ