diff mbox series

[-next] crypto: sa2ul: add Kconfig selects to fix build error

Message ID 6e04b405-7369-ff04-a2dd-aa7c561e13d6@infradead.org (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [-next] crypto: sa2ul: add Kconfig selects to fix build error | expand

Commit Message

Randy Dunlap Aug. 6, 2020, 3:54 p.m. UTC
From: Randy Dunlap <rdunlap@infradead.org>

sa2ul.c uses sha{1,256,512}_zero_message_hash, so select the
Kconfig symbols that provide those, like other crypto drivers do.

Fixes this build error:

ld: drivers/crypto/sa2ul.o: in function `sa_sha_digest':
sa2ul.c:(.text+0x2b25): undefined reference to `sha512_zero_message_hash'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org> # 2020-07-29
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
---
 drivers/crypto/Kconfig |    3 +++
 1 file changed, 3 insertions(+)

Comments

J, KEERTHY Aug. 6, 2020, 5:37 p.m. UTC | #1
On 8/6/2020 9:24 PM, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> sa2ul.c uses sha{1,256,512}_zero_message_hash, so select the
> Kconfig symbols that provide those, like other crypto drivers do.
> 
> Fixes this build error:
> 
> ld: drivers/crypto/sa2ul.o: in function `sa_sha_digest':
> sa2ul.c:(.text+0x2b25): undefined reference to `sha512_zero_message_hash'

Thanks for catching this.

Reviewed-by: Keerthy <j-keerthy@ti.com>

> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: Randy Dunlap <rdunlap@infradead.org> # 2020-07-29
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: Tero Kristo <t-kristo@ti.com>
> Cc: Keerthy <j-keerthy@ti.com>
> ---
>   drivers/crypto/Kconfig |    3 +++
>   1 file changed, 3 insertions(+)
> 
> --- linux-next-20200806.orig/drivers/crypto/Kconfig
> +++ linux-next-20200806/drivers/crypto/Kconfig
> @@ -873,6 +873,9 @@ config CRYPTO_DEV_SA2UL
>   	select CRYPTO_AES
>   	select CRYPTO_AES_ARM64
>   	select CRYPTO_ALGAPI
> +	select CRYPTO_SHA1
> +	select CRYPTO_SHA256
> +	select CRYPTO_SHA512
>   	select HW_RANDOM
>   	select SG_SPLIT
>   	help
>
Herbert Xu Aug. 21, 2020, 7:57 a.m. UTC | #2
On Thu, Aug 06, 2020 at 08:54:48AM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> sa2ul.c uses sha{1,256,512}_zero_message_hash, so select the
> Kconfig symbols that provide those, like other crypto drivers do.
> 
> Fixes this build error:
> 
> ld: drivers/crypto/sa2ul.o: in function `sa_sha_digest':
> sa2ul.c:(.text+0x2b25): undefined reference to `sha512_zero_message_hash'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: Randy Dunlap <rdunlap@infradead.org> # 2020-07-29
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: Tero Kristo <t-kristo@ti.com>
> Cc: Keerthy <j-keerthy@ti.com>
> ---
>  drivers/crypto/Kconfig |    3 +++
>  1 file changed, 3 insertions(+)

Patch applied.  Thanks.
diff mbox series

Patch

--- linux-next-20200806.orig/drivers/crypto/Kconfig
+++ linux-next-20200806/drivers/crypto/Kconfig
@@ -873,6 +873,9 @@  config CRYPTO_DEV_SA2UL
 	select CRYPTO_AES
 	select CRYPTO_AES_ARM64
 	select CRYPTO_ALGAPI
+	select CRYPTO_SHA1
+	select CRYPTO_SHA256
+	select CRYPTO_SHA512
 	select HW_RANDOM
 	select SG_SPLIT
 	help