stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 for 5.4 1/2] crypto: atmel - Fix selection of CRYPTO_AUTHENC
@ 2020-07-15 12:54 Tudor Ambarus
  2020-07-15 12:54 ` [PATCH v2 for 5.4 2/2] crypto: atmel - Fix build error " Tudor Ambarus
  2020-07-16 11:59 ` [PATCH v2 for 5.4 1/2] crypto: atmel - Fix selection " Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Tudor Ambarus @ 2020-07-15 12:54 UTC (permalink / raw)
  To: gregkh, alexander.levin; +Cc: stable, herbert, Tudor Ambarus

Backport to 5.4.52-rc1:
commit d158367682cd822aca811971e988be6a8d8f679f upstream.

The following error is raised when CONFIG_CRYPTO_DEV_ATMEL_AES=y and
CONFIG_CRYPTO_DEV_ATMEL_AUTHENC=m:
drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_setkey':
atmel-aes.c:(.text+0x9bc): undefined reference to `crypto_authenc_extractkeys'
Makefile:1094: recipe for target 'vmlinux' failed

Fix it by moving the selection of CRYPTO_AUTHENC under
config CRYPTO_DEV_ATMEL_AES.

Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 drivers/crypto/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 06b2b3fa5206..b76ded4f829b 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -493,7 +493,6 @@ endif # if CRYPTO_DEV_UX500
 config CRYPTO_DEV_ATMEL_AUTHENC
 	tristate "Support for Atmel IPSEC/SSL hw accelerator"
 	depends on ARCH_AT91 || COMPILE_TEST
-	select CRYPTO_AUTHENC
 	select CRYPTO_DEV_ATMEL_AES
 	select CRYPTO_DEV_ATMEL_SHA
 	help
@@ -508,6 +507,7 @@ config CRYPTO_DEV_ATMEL_AES
 	select CRYPTO_AES
 	select CRYPTO_AEAD
 	select CRYPTO_BLKCIPHER
+	select CRYPTO_AUTHENC
 	help
 	  Some Atmel processors have AES hw accelerator.
 	  Select this if you want to use the Atmel module for
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 for 5.4 2/2] crypto: atmel - Fix build error of CRYPTO_AUTHENC
  2020-07-15 12:54 [PATCH v2 for 5.4 1/2] crypto: atmel - Fix selection of CRYPTO_AUTHENC Tudor Ambarus
@ 2020-07-15 12:54 ` Tudor Ambarus
  2020-07-16 11:59 ` [PATCH v2 for 5.4 1/2] crypto: atmel - Fix selection " Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Tudor Ambarus @ 2020-07-15 12:54 UTC (permalink / raw)
  To: gregkh, alexander.levin
  Cc: stable, herbert, YueHaibing, Hulk Robot, kernel test robot,
	Tudor Ambarus

From: YueHaibing <yuehaibing@huawei.com>

Backport to 5.4.52-rc1:
commit aee1f9f3c30e1e20e7f74729ced61eac7d74ca68 upstream.

If CRYPTO_DEV_ATMEL_AUTHENC is m, CRYPTO_DEV_ATMEL_SHA is m,
but CRYPTO_DEV_ATMEL_AES is y, building will fail:

drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_init_tfm':
atmel-aes.c:(.text+0x670): undefined reference to `atmel_sha_authenc_get_reqsize'
atmel-aes.c:(.text+0x67a): undefined reference to `atmel_sha_authenc_spawn'
drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_setkey':
atmel-aes.c:(.text+0x7e5): undefined reference to `atmel_sha_authenc_setkey'

Make CRYPTO_DEV_ATMEL_AUTHENC depend on CRYPTO_DEV_ATMEL_AES,
and select CRYPTO_DEV_ATMEL_SHA and CRYPTO_AUTHENC for it under there.

Reported-by: Hulk Robot <hulkci@huawei.com>
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Herbert Xu <herbert@gondor.apana.org.au>
Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 drivers/crypto/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index b76ded4f829b..0952f059d967 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -491,10 +491,9 @@ if CRYPTO_DEV_UX500
 endif # if CRYPTO_DEV_UX500
 
 config CRYPTO_DEV_ATMEL_AUTHENC
-	tristate "Support for Atmel IPSEC/SSL hw accelerator"
+	bool "Support for Atmel IPSEC/SSL hw accelerator"
 	depends on ARCH_AT91 || COMPILE_TEST
-	select CRYPTO_DEV_ATMEL_AES
-	select CRYPTO_DEV_ATMEL_SHA
+	depends on CRYPTO_DEV_ATMEL_AES
 	help
 	  Some Atmel processors can combine the AES and SHA hw accelerators
 	  to enhance support of IPSEC/SSL.
@@ -507,7 +506,8 @@ config CRYPTO_DEV_ATMEL_AES
 	select CRYPTO_AES
 	select CRYPTO_AEAD
 	select CRYPTO_BLKCIPHER
-	select CRYPTO_AUTHENC
+	select CRYPTO_AUTHENC if CRYPTO_DEV_ATMEL_AUTHENC
+	select CRYPTO_DEV_ATMEL_SHA if CRYPTO_DEV_ATMEL_AUTHENC
 	help
 	  Some Atmel processors have AES hw accelerator.
 	  Select this if you want to use the Atmel module for
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 for 5.4 1/2] crypto: atmel - Fix selection of CRYPTO_AUTHENC
  2020-07-15 12:54 [PATCH v2 for 5.4 1/2] crypto: atmel - Fix selection of CRYPTO_AUTHENC Tudor Ambarus
  2020-07-15 12:54 ` [PATCH v2 for 5.4 2/2] crypto: atmel - Fix build error " Tudor Ambarus
@ 2020-07-16 11:59 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-07-16 11:59 UTC (permalink / raw)
  To: Tudor Ambarus; +Cc: alexander.levin, stable, herbert

On Wed, Jul 15, 2020 at 03:54:09PM +0300, Tudor Ambarus wrote:
> Backport to 5.4.52-rc1:
> commit d158367682cd822aca811971e988be6a8d8f679f upstream.
> 
> The following error is raised when CONFIG_CRYPTO_DEV_ATMEL_AES=y and
> CONFIG_CRYPTO_DEV_ATMEL_AUTHENC=m:
> drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_setkey':
> atmel-aes.c:(.text+0x9bc): undefined reference to `crypto_authenc_extractkeys'
> Makefile:1094: recipe for target 'vmlinux' failed
> 
> Fix it by moving the selection of CRYPTO_AUTHENC under
> config CRYPTO_DEV_ATMEL_AES.
> 
> Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...")
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
>  drivers/crypto/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Both of these now queued up, thanks!

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-16 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15 12:54 [PATCH v2 for 5.4 1/2] crypto: atmel - Fix selection of CRYPTO_AUTHENC Tudor Ambarus
2020-07-15 12:54 ` [PATCH v2 for 5.4 2/2] crypto: atmel - Fix build error " Tudor Ambarus
2020-07-16 11:59 ` [PATCH v2 for 5.4 1/2] crypto: atmel - Fix selection " Greg KH

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).