[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c545db3-1581-18f0-3543-eb666e1a8eb6@amd.com>
Date: Sat, 24 Aug 2024 13:31:42 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: Pavan Kumar Paluri <papaluri@....com>, linux-crypto@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Ashish Kalra <ashish.kalra@....com>,
John Allen <john.allen@....com>, Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>, stable@...r.kernel.org
Subject: Re: [PATCH] crypto: ccp: Properly unregister /dev/sev on sev
PLATFORM_STATUS failure
On 8/15/24 07:25, Pavan Kumar Paluri wrote:
> In case of sev PLATFORM_STATUS failure, sev_get_api_version() fails
> resulting in sev_data field of psp_master nulled out. This later becomes
> a problem when unloading the ccp module because the device has not been
> unregistered (via misc_deregister()) before clearing the sev_data field
> of psp_master. As a result, on reloading the ccp module, a duplicate
> device issue is encountered as can be seen from the dmesg log below.
>
> on reloading ccp module via modprobe ccp
>
...
>
> Address this issue by unregistering the /dev/sev before clearing out
> sev_data in case of PLATFORM_STATUS failure.
>
> Fixes: 200664d5237f ("crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support")
> Cc: stable@...r.kernel.org
> Signed-off-by: Pavan Kumar Paluri <papaluri@....com>
Acked-by: Tom Lendacky <thomas.lendacky@....com>
> ---
Powered by blists - more mailing lists