virt: sevguest: add CONFIG_CRYPTO dependency

Message ID 20230117171416.2715125-1-arnd@kernel.org
State New
Headers
Series virt: sevguest: add CONFIG_CRYPTO dependency |

Commit Message

Arnd Bergmann Jan. 17, 2023, 5:13 p.m. UTC
  From: Arnd Bergmann <arnd@arndb.de>

This driver fails to link when CRYPTO is disabled, or in a loadable module:

WARNING: unmet direct dependencies detected for CRYPTO_GCM
WARNING: unmet direct dependencies detected for CRYPTO_AEAD2
  Depends on [m]: CRYPTO [=m]
  Selected by [y]:
  - SEV_GUEST [=y] && VIRT_DRIVERS [=y] && AMD_MEM_ENCRYPT [=y]

x86_64-linux-ld: crypto/aead.o: in function `crypto_register_aeads':

Fixes: d63670d23e60 ("virt: sevguest: Rename the sevguest dir and files to sev-guest")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/virt/coco/sev-guest/Kconfig | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Tom Lendacky Jan. 17, 2023, 5:26 p.m. UTC | #1
On 1/17/23 11:13, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> This driver fails to link when CRYPTO is disabled, or in a loadable module:
> 
> WARNING: unmet direct dependencies detected for CRYPTO_GCM
> WARNING: unmet direct dependencies detected for CRYPTO_AEAD2
>    Depends on [m]: CRYPTO [=m]
>    Selected by [y]:
>    - SEV_GUEST [=y] && VIRT_DRIVERS [=y] && AMD_MEM_ENCRYPT [=y]
> 
> x86_64-linux-ld: crypto/aead.o: in function `crypto_register_aeads':
> 
> Fixes: d63670d23e60 ("virt: sevguest: Rename the sevguest dir and files to sev-guest")

This has been present from when the driver was first added, so I think the 
correct Fixes: tag should be:

Fixes: fce96cf04430 ("virt: Add SEV-SNP guest driver")

Correct?

Thanks,
Tom

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/virt/coco/sev-guest/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/virt/coco/sev-guest/Kconfig b/drivers/virt/coco/sev-guest/Kconfig
> index f9db0799ae67..da2d7ca531f0 100644
> --- a/drivers/virt/coco/sev-guest/Kconfig
> +++ b/drivers/virt/coco/sev-guest/Kconfig
> @@ -2,6 +2,7 @@ config SEV_GUEST
>   	tristate "AMD SEV Guest driver"
>   	default m
>   	depends on AMD_MEM_ENCRYPT
> +	select CRYPTO
>   	select CRYPTO_AEAD2
>   	select CRYPTO_GCM
>   	help
  
Tom Lendacky Jan. 17, 2023, 5:27 p.m. UTC | #2
Updating email for Boris.

On 1/17/23 11:26, Tom Lendacky wrote:
> On 1/17/23 11:13, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> This driver fails to link when CRYPTO is disabled, or in a loadable module:
>>
>> WARNING: unmet direct dependencies detected for CRYPTO_GCM
>> WARNING: unmet direct dependencies detected for CRYPTO_AEAD2
>>    Depends on [m]: CRYPTO [=m]
>>    Selected by [y]:
>>    - SEV_GUEST [=y] && VIRT_DRIVERS [=y] && AMD_MEM_ENCRYPT [=y]
>>
>> x86_64-linux-ld: crypto/aead.o: in function `crypto_register_aeads':
>>
>> Fixes: d63670d23e60 ("virt: sevguest: Rename the sevguest dir and files 
>> to sev-guest")
> 
> This has been present from when the driver was first added, so I think the 
> correct Fixes: tag should be:
> 
> Fixes: fce96cf04430 ("virt: Add SEV-SNP guest driver")
> 
> Correct?
> 
> Thanks,
> Tom
> 
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>   drivers/virt/coco/sev-guest/Kconfig | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/virt/coco/sev-guest/Kconfig 
>> b/drivers/virt/coco/sev-guest/Kconfig
>> index f9db0799ae67..da2d7ca531f0 100644
>> --- a/drivers/virt/coco/sev-guest/Kconfig
>> +++ b/drivers/virt/coco/sev-guest/Kconfig
>> @@ -2,6 +2,7 @@ config SEV_GUEST
>>       tristate "AMD SEV Guest driver"
>>       default m
>>       depends on AMD_MEM_ENCRYPT
>> +    select CRYPTO
>>       select CRYPTO_AEAD2
>>       select CRYPTO_GCM
>>       help
  

Patch

diff --git a/drivers/virt/coco/sev-guest/Kconfig b/drivers/virt/coco/sev-guest/Kconfig
index f9db0799ae67..da2d7ca531f0 100644
--- a/drivers/virt/coco/sev-guest/Kconfig
+++ b/drivers/virt/coco/sev-guest/Kconfig
@@ -2,6 +2,7 @@  config SEV_GUEST
 	tristate "AMD SEV Guest driver"
 	default m
 	depends on AMD_MEM_ENCRYPT
+	select CRYPTO
 	select CRYPTO_AEAD2
 	select CRYPTO_GCM
 	help