lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXH5U7Ztv_vn=ej8GJh9hWoVetQz3RxihoYL8WxdLJZMQQ@mail.gmail.com>
Date:   Fri, 15 Oct 2021 15:55:01 +0200
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Vegard Nossum <vegard.nossum@...cle.com>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Eric Biggers <ebiggers@...nel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>
Cc:     linux-efi <linux-efi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH] efi: select CRYPTO for EFI_EMBEDDED_FIRMWARE

(+ crypto folks)

On Fri, 15 Oct 2021 at 15:24, Vegard Nossum <vegard.nossum@...cle.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@...hat.com>
> Signed-off-by: Vegard Nossum <vegard.nossum@...cle.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ