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: <3ffa8780-f985-40ac-b011-e31c2cbfc8ba@amd.com>
Date: Wed, 28 May 2025 20:19:34 -0500
From: "Kalra, Ashish" <ashish.kalra@....com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: thomas.lendacky@....com, john.allen@....com, davem@...emloft.net,
 dan.carpenter@...aro.org, linux-crypto@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: ccp: Fix dereferencing uninitialized error
 pointer


On 5/28/2025 6:26 PM, Herbert Xu wrote:
> On Wed, May 28, 2025 at 08:20:18PM +0000, Ashish Kalra wrote:
>>
>> @@ -1320,10 +1322,10 @@ static int __sev_platform_init_locked(int *error)
>>  
>>  	/* Prepare for first SEV guest launch after INIT */
>>  	wbinvd_on_all_cpus();
>> -	rc = __sev_do_cmd_locked(SEV_CMD_DF_FLUSH, NULL, error);
>> +	rc = __sev_do_cmd_locked(SEV_CMD_DF_FLUSH, NULL, &dfflush_error);
>>  	if (rc) {
>>  		dev_err(sev->dev, "SEV: DF_FLUSH failed %#x, rc %d\n",
>> -			*error, rc);
>> +			dfflush_error, rc);
> 
> dfflush_error is never returned to the caller unlike psp_ret, is
> this intentional?

Yes, this is intentional. 

As this function does SEV_INIT, it needs to return the firmware error (psp_ret) of SEV_INIT back to the caller.

For DF_FLUSH failures, errors are indicated only via the log and for that dfflush_error is used.

Thanks,
Ashish

> 
> Thanks,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ