Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1137576pxb; Sat, 16 Oct 2021 02:41:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzziw0i07l0IpBJ9sG/EpHbEg4BIdZQdfyOnXMlWPu/fmgad+JwMu+VlAm/n+3M6o8oERQS X-Received: by 2002:a17:906:ecf6:: with SMTP id qt22mr13536267ejb.292.1634377295379; Sat, 16 Oct 2021 02:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634377295; cv=none; d=google.com; s=arc-20160816; b=cdR0ukW87TeRg5Z2BbXzvkoZf1SwX2UQepMO7TsKqfJ2ELXsFDRhjY35Ah1e1E/xP0 peM2jyh3MknErgj4lFuZcAUoK0aytiu41d+wfIW0u7gGVJvefrh6c9x3Bl0eJ8GtRDUB cfEKyMkzDJDmLhcegXaZO61ClitBlatzkQRqwqM45FtERbPW5hNjSPAU7R0Im4hxhmS2 SRjc6xrGe7vexinGwbXOmb5awdknuIFCb879sGcEgICTUOF9zmTUeHLLEto/9KxEjSu2 oxXPpQNh2SYbIFCjNddwOSFvaDIwpCXY1pxeY385iOiVKojTRvhxIMPcF7PTsGdADBnH +kFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Cc3RRgDSDXNs+b4zVddMpEotKnBKFu8NPxlvXXMa76g=; b=p3eLO7/i2mu8adFp6j84LdvbvM3v73K3f7zdB3MGjy+vDn1/XjvF5x0HlyGyb1rXwZ rlIVE7aRmq05p3lv6CK3Sd6Wzc28AJ2xQFkXWDmjUQu82lxVxu0mVaQZIzE76sCDXywx KAs08Ri8agQ0zk6gV4HcQzxktKkPUgmbAWGVg7r7ZrdDsS5gnZALrDelt3kCkL4XC6Ui F/le5t+UKy+6CO36d6C0IbgPWeD65b0DoEJnGWTQG+JGcqQYcyHL43RLVArqj4E2VW7O muvcm8rzTlLmrbWXsq1pBRDumOLE7jgRSurTeQAJELYTmzIHPqGZTp0J3rdtyRM1CuZd fHFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NguL+SI/"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb2si15900453ejc.740.2021.10.16.02.40.49; Sat, 16 Oct 2021 02:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NguL+SI/"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236472AbhJON5T (ORCPT + 99 others); Fri, 15 Oct 2021 09:57:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:53212 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240085AbhJON5T (ORCPT ); Fri, 15 Oct 2021 09:57:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E8F62611C3; Fri, 15 Oct 2021 13:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634306112; bh=W9JUX50y1R3dPEz3lpKtAb3gbC3sCZbENO1ZX8uqAUM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NguL+SI/UwIzAHOCJu+NF7mY1gND43pY5ijUx6UWsbqpPHgA+yfNmqTeEaGiJSv3W As88CYHX4mi/f1GQC5lQjfJNAEwX/J9NErt/IjoLCztUibFmZBeul1EzQEPi1bG9bp +LMRtzwrM1Ynxq/thG1SdH7i/ni0xrw7NhDbBJxG6Hq5HhI4iyGLTG9mNSG9bOcLIN xSkc+WC2I+ysEqd1rdcxFvqe7eMq3QD+PLcK3TS0I5gysN7pL9TN/htOL5L/OGSyk/ p4B+wR4fYdtINK1cXkkfOLw//fburNpYif1hr2bRI8lR5IMNBMCkVS9txJ8YaDKPvD 4tviN3JNRMogg== Received: by mail-ot1-f48.google.com with SMTP id b4-20020a9d7544000000b00552ab826e3aso11201355otl.4; Fri, 15 Oct 2021 06:55:12 -0700 (PDT) X-Gm-Message-State: AOAM532zFwzp3QaReLn6BxltWsHpIH7WMKtZwDmyRhMpGNHM019iVuI2 V0hAwjowwnD1FFq2Bk+dOKs7FNlD0q+QbV9Se3g= X-Received: by 2002:a9d:7b48:: with SMTP id f8mr8265172oto.112.1634306112213; Fri, 15 Oct 2021 06:55:12 -0700 (PDT) MIME-Version: 1.0 References: <20211015131946.13374-1-vegard.nossum@oracle.com> In-Reply-To: <20211015131946.13374-1-vegard.nossum@oracle.com> From: Ard Biesheuvel Date: Fri, 15 Oct 2021 15:55:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] efi: select CRYPTO for EFI_EMBEDDED_FIRMWARE To: Vegard Nossum , Linux Crypto Mailing List , Eric Biggers , Herbert Xu Cc: linux-efi , Linux Kernel Mailing List , Hans de Goede Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org (+ crypto folks) On Fri, 15 Oct 2021 at 15:24, Vegard Nossum 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 > Signed-off-by: Vegard Nossum 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 >