* [PATCH] efi: select CRYPTO for EFI_EMBEDDED_FIRMWARE
@ 2021-10-15 13:19 Vegard Nossum
2021-10-15 13:55 ` Ard Biesheuvel
0 siblings, 1 reply; 3+ messages in thread
From: Vegard Nossum @ 2021-10-15 13:19 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: linux-efi, linux-kernel, Vegard Nossum, Hans de Goede
Fix the following build warning:
WARNING: unmet direct dependencies detected for CRYPTO_LIB_SHA256
Depends on [n]: CRYPTO [=n]
Selected by [y]:
- EFI_EMBEDDED_FIRMWARE [=y] && EFI [=y]
Fixes: f0df68d5bae88 ("efi: Add embedded peripheral firmware support")
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
drivers/firmware/efi/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 2c3dac5ecb36d..f914da9845acc 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -248,6 +248,7 @@ endmenu
config EFI_EMBEDDED_FIRMWARE
bool
depends on EFI
+ select CRYPTO
select CRYPTO_LIB_SHA256
config UEFI_CPER
--
2.23.0.718.g5ad94255a8
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] efi: select CRYPTO for EFI_EMBEDDED_FIRMWARE
2021-10-15 13:19 [PATCH] efi: select CRYPTO for EFI_EMBEDDED_FIRMWARE Vegard Nossum
@ 2021-10-15 13:55 ` Ard Biesheuvel
2021-10-15 19:10 ` Eric Biggers
0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2021-10-15 13:55 UTC (permalink / raw)
To: Vegard Nossum, Linux Crypto Mailing List, Eric Biggers, Herbert Xu
Cc: linux-efi, Linux Kernel Mailing List, Hans de Goede
(+ crypto folks)
On Fri, 15 Oct 2021 at 15:24, Vegard Nossum <vegard.nossum@oracle.com> wrote:
>
> Fix the following build warning:
>
> WARNING: unmet direct dependencies detected for CRYPTO_LIB_SHA256
> Depends on [n]: CRYPTO [=n]
> Selected by [y]:
> - EFI_EMBEDDED_FIRMWARE [=y] && EFI [=y]
>
> Fixes: f0df68d5bae88 ("efi: Add embedded peripheral firmware support")
> Cc: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Hello Vegard,
I don't think this is the right fix, to be honest. The crypto library
functions have no dependencies at all on the crypto API, so I think it
would be better to do something like the below:
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 536df4b6b825..b79de4820ce9 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1919,9 +1919,10 @@ config CRYPTO_STATS
config CRYPTO_HASH_INFO
bool
-source "lib/crypto/Kconfig"
source "drivers/crypto/Kconfig"
source "crypto/asymmetric_keys/Kconfig"
source "certs/Kconfig"
endif # if CRYPTO
+
+source "lib/crypto/Kconfig"
> ---
> drivers/firmware/efi/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
> index 2c3dac5ecb36d..f914da9845acc 100644
> --- a/drivers/firmware/efi/Kconfig
> +++ b/drivers/firmware/efi/Kconfig
> @@ -248,6 +248,7 @@ endmenu
> config EFI_EMBEDDED_FIRMWARE
> bool
> depends on EFI
> + select CRYPTO
> select CRYPTO_LIB_SHA256
>
> config UEFI_CPER
> --
> 2.23.0.718.g5ad94255a8
>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] efi: select CRYPTO for EFI_EMBEDDED_FIRMWARE
2021-10-15 13:55 ` Ard Biesheuvel
@ 2021-10-15 19:10 ` Eric Biggers
0 siblings, 0 replies; 3+ messages in thread
From: Eric Biggers @ 2021-10-15 19:10 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Vegard Nossum, Linux Crypto Mailing List, Herbert Xu, linux-efi,
Linux Kernel Mailing List, Hans de Goede
On Fri, Oct 15, 2021 at 03:55:01PM +0200, Ard Biesheuvel wrote:
> (+ crypto folks)
>
> On Fri, 15 Oct 2021 at 15:24, Vegard Nossum <vegard.nossum@oracle.com> wrote:
> >
> > Fix the following build warning:
> >
> > WARNING: unmet direct dependencies detected for CRYPTO_LIB_SHA256
> > Depends on [n]: CRYPTO [=n]
> > Selected by [y]:
> > - EFI_EMBEDDED_FIRMWARE [=y] && EFI [=y]
> >
> > Fixes: f0df68d5bae88 ("efi: Add embedded peripheral firmware support")
> > Cc: Hans de Goede <hdegoede@redhat.com>
> > Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
>
> Hello Vegard,
>
> I don't think this is the right fix, to be honest. The crypto library
> functions have no dependencies at all on the crypto API, so I think it
> would be better to do something like the below:
Actually some of the crypto library functions need __crypto_xor() and
__crypto_memneq() which are only compiled when CRYPTO. So that will need to be
fixed by moving those functions to an appropriate place first.
- Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-15 19:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 13:19 [PATCH] efi: select CRYPTO for EFI_EMBEDDED_FIRMWARE Vegard Nossum
2021-10-15 13:55 ` Ard Biesheuvel
2021-10-15 19:10 ` Eric Biggers
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).