* [PATCH] crypto: ccp: Do not free psp_master when PLATFORM_INIT fails
@ 2019-04-08 20:42 Singh, Brijesh
2019-04-18 14:23 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Singh, Brijesh @ 2019-04-08 20:42 UTC (permalink / raw)
To: linux-crypto
Cc: linux-kernel, Singh, Brijesh, Lendacky, Thomas, Herbert Xu, Hook,
Gary, stable
Currently, we free the psp_master if the PLATFORM_INIT fails during the
SEV FW probe. If psp_master is freed then driver does not invoke the PSP
FW. As per SEV FW spec, there are several commands (PLATFORM_RESET,
PLATFORM_STATUS, GET_ID etc) which can be executed in the UNINIT state
We should not free the psp_master when PLATFORM_INIT fails.
Fixes: 200664d5237f ("crypto: ccp: Add SEV support")
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Gary Hook <gary.hook@amd.com>
Cc: stable@vger.kernel.org # 4.19.y
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
---
drivers/crypto/ccp/psp-dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
index 80a59be9c80d..656838433f2f 100644
--- a/drivers/crypto/ccp/psp-dev.c
+++ b/drivers/crypto/ccp/psp-dev.c
@@ -1064,7 +1064,7 @@ void psp_pci_init(void)
rc = sev_platform_init(&error);
if (rc) {
dev_err(sp->dev, "SEV: failed to INIT error %#x\n", error);
- goto err;
+ return;
}
dev_info(sp->dev, "SEV API:%d.%d build:%d\n", psp_master->api_major,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: ccp: Do not free psp_master when PLATFORM_INIT fails
2019-04-08 20:42 [PATCH] crypto: ccp: Do not free psp_master when PLATFORM_INIT fails Singh, Brijesh
@ 2019-04-18 14:23 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2019-04-18 14:23 UTC (permalink / raw)
To: Singh, Brijesh
Cc: linux-crypto, linux-kernel, Lendacky, Thomas, Hook, Gary, stable
On Mon, Apr 08, 2019 at 08:42:55PM +0000, Singh, Brijesh wrote:
> Currently, we free the psp_master if the PLATFORM_INIT fails during the
> SEV FW probe. If psp_master is freed then driver does not invoke the PSP
> FW. As per SEV FW spec, there are several commands (PLATFORM_RESET,
> PLATFORM_STATUS, GET_ID etc) which can be executed in the UNINIT state
> We should not free the psp_master when PLATFORM_INIT fails.
>
> Fixes: 200664d5237f ("crypto: ccp: Add SEV support")
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Gary Hook <gary.hook@amd.com>
> Cc: stable@vger.kernel.org # 4.19.y
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
> drivers/crypto/ccp/psp-dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-18 15:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 20:42 [PATCH] crypto: ccp: Do not free psp_master when PLATFORM_INIT fails Singh, Brijesh
2019-04-18 14:23 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).