public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: "Kalra, Ashish" <ashish.kalra@amd.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: thomas.lendacky@amd.com, john.allen@amd.com, davem@davemloft.net,
	dan.carpenter@linaro.org, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: ccp: Fix dereferencing uninitialized error pointer
Date: Wed, 28 May 2025 20:19:34 -0500	[thread overview]
Message-ID: <3ffa8780-f985-40ac-b011-e31c2cbfc8ba@amd.com> (raw)
In-Reply-To: <aDebwj8rcuWPIKOa@gondor.apana.org.au>


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,


  reply	other threads:[~2025-05-29  1:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28 20:20 [PATCH] crypto: ccp: Fix dereferencing uninitialized error pointer Ashish Kalra
2025-05-28 23:26 ` Herbert Xu
2025-05-29  1:19   ` Kalra, Ashish [this message]
2025-05-29 19:48 ` Tom Lendacky
2025-06-16  2:46 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ffa8780-f985-40ac-b011-e31c2cbfc8ba@amd.com \
    --to=ashish.kalra@amd.com \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=john.allen@amd.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.lendacky@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox