* [PATCH -next] crypto: atmel - Fix randbuild error
@ 2019-11-11 13:39 YueHaibing
2019-11-12 2:13 ` Herbert Xu
2019-11-12 7:24 ` [PATCH v2 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC YueHaibing
0 siblings, 2 replies; 9+ messages in thread
From: YueHaibing @ 2019-11-11 13:39 UTC (permalink / raw)
To: herbert, davem, cyrille.pitchen; +Cc: linux-crypto, linux-kernel, YueHaibing
If CRYPTO_AUTHENC is m, CRYPTO_DEV_ATMEL_SHA is m, but
CRYPTO_DEV_ATMEL_AES is y, building will fails:
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'
Fix this by moving the selection of CRYPTO_DEV_ATMEL_SHA under
CRYPTO_DEV_ATMEL_AES.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/crypto/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index c5cc04d..148605a 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -495,7 +495,6 @@ config CRYPTO_DEV_ATMEL_AUTHENC
tristate "Support for Atmel IPSEC/SSL hw accelerator"
depends on ARCH_AT91 || COMPILE_TEST
select CRYPTO_DEV_ATMEL_AES
- select CRYPTO_DEV_ATMEL_SHA
help
Some Atmel processors can combine the AES and SHA hw accelerators
to enhance support of IPSEC/SSL.
@@ -509,6 +508,7 @@ config CRYPTO_DEV_ATMEL_AES
select CRYPTO_AEAD
select CRYPTO_AUTHENC
select CRYPTO_SKCIPHER
+ select CRYPTO_DEV_ATMEL_SHA
help
Some Atmel processors have AES hw accelerator.
Select this if you want to use the Atmel module for
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH -next] crypto: atmel - Fix randbuild error
2019-11-11 13:39 [PATCH -next] crypto: atmel - Fix randbuild error YueHaibing
@ 2019-11-12 2:13 ` Herbert Xu
2019-11-12 2:15 ` Herbert Xu
2019-11-12 7:24 ` [PATCH v2 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC YueHaibing
1 sibling, 1 reply; 9+ messages in thread
From: Herbert Xu @ 2019-11-12 2:13 UTC (permalink / raw)
To: YueHaibing
Cc: davem, cyrille.pitchen, linux-crypto, linux-kernel, Tudor Ambarus
On Mon, Nov 11, 2019 at 09:39:01PM +0800, YueHaibing wrote:
> If CRYPTO_AUTHENC is m, CRYPTO_DEV_ATMEL_SHA is m, but
> CRYPTO_DEV_ATMEL_AES is y, building will fails:
>
> 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'
>
> Fix this by moving the selection of CRYPTO_DEV_ATMEL_SHA under
> CRYPTO_DEV_ATMEL_AES.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
This patch shows that moving CRYPTO_AUTHENC over was just papering
over a real problem. Applying your patch essentially makes SHA
the same option as AES.
What we should do instead is turn DEV_ATMEL_AUTHENC into a bool,
and then add these to DEV_ATMEL_AES:
select CRYPTO_AUTHENC if CRYPTO_DEV_ATMEL_AUTHENC
select CRYPTO_DEV_ATMEL_SHA if CRYPTO_DEV_ATMEL_AUTHENC
Could you please do this and repost?
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] crypto: atmel - Fix randbuild error
2019-11-12 2:13 ` Herbert Xu
@ 2019-11-12 2:15 ` Herbert Xu
2019-11-12 11:56 ` Tudor.Ambarus
0 siblings, 1 reply; 9+ messages in thread
From: Herbert Xu @ 2019-11-12 2:15 UTC (permalink / raw)
To: YueHaibing
Cc: davem, cyrille.pitchen, linux-crypto, linux-kernel, Tudor Ambarus
On Tue, Nov 12, 2019 at 10:13:50AM +0800, Herbert Xu wrote:
>
> What we should do instead is turn DEV_ATMEL_AUTHENC into a bool,
Oh and DEV_ATMEL_AUTHENC should also depend on CRYPTO_DEV_ATMEL_AES
and lose all its selects.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC
2019-11-11 13:39 [PATCH -next] crypto: atmel - Fix randbuild error YueHaibing
2019-11-12 2:13 ` Herbert Xu
@ 2019-11-12 7:24 ` YueHaibing
2019-11-12 12:19 ` Tudor.Ambarus
2019-11-13 9:55 ` [PATCH v3 " YueHaibing
1 sibling, 2 replies; 9+ messages in thread
From: YueHaibing @ 2019-11-12 7:24 UTC (permalink / raw)
To: herbert, davem, cyrille.pitchen; +Cc: linux-crypto, linux-kernel, YueHaibing
If CRYPTO_DEV_ATMEL_AUTHENC is m, CRYPTO_DEV_ATMEL_SHA is m,
but CRYPTO_DEV_ATMEL_AES is y, building will fails:
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 depends 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>
Suggested-by: Herbert Xu <herbert@gondor.apana.org.au>
Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: make CRYPTO_DEV_ATMEL_AUTHENC depends on DEV_ATMEL_AES
---
drivers/crypto/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index c5cc04d..296e829 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -492,10 +492,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,8 +506,9 @@ config CRYPTO_DEV_ATMEL_AES
depends on ARCH_AT91 || COMPILE_TEST
select CRYPTO_AES
select CRYPTO_AEAD
- select CRYPTO_AUTHENC
select CRYPTO_SKCIPHER
+ 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.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH -next] crypto: atmel - Fix randbuild error
2019-11-12 2:15 ` Herbert Xu
@ 2019-11-12 11:56 ` Tudor.Ambarus
2019-11-12 12:16 ` Tudor.Ambarus
0 siblings, 1 reply; 9+ messages in thread
From: Tudor.Ambarus @ 2019-11-12 11:56 UTC (permalink / raw)
To: herbert, yuehaibing; +Cc: davem, cyrille.pitchen, linux-crypto, linux-kernel
On 11/12/2019 04:15 AM, Herbert Xu wrote:
> External E-Mail
>
>
> On Tue, Nov 12, 2019 at 10:13:50AM +0800, Herbert Xu wrote:
>>
>> What we should do instead is turn DEV_ATMEL_AUTHENC into a bool,
>
> Oh and DEV_ATMEL_AUTHENC should also depend on CRYPTO_DEV_ATMEL_AES
> and lose all its selects.
>
How about getting rid of CONFIG_CRYPTO_DEV_ATMEL_AUTHENC entirely?
ta
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] crypto: atmel - Fix randbuild error
2019-11-12 11:56 ` Tudor.Ambarus
@ 2019-11-12 12:16 ` Tudor.Ambarus
0 siblings, 0 replies; 9+ messages in thread
From: Tudor.Ambarus @ 2019-11-12 12:16 UTC (permalink / raw)
To: herbert, yuehaibing; +Cc: davem, cyrille.pitchen, linux-crypto, linux-kernel
On 11/12/2019 01:56 PM, Tudor.Ambarus@microchip.com wrote:
>
>
> On 11/12/2019 04:15 AM, Herbert Xu wrote:
>> External E-Mail
>>
>>
>> On Tue, Nov 12, 2019 at 10:13:50AM +0800, Herbert Xu wrote:
>>>
>>> What we should do instead is turn DEV_ATMEL_AUTHENC into a bool,
>>
>> Oh and DEV_ATMEL_AUTHENC should also depend on CRYPTO_DEV_ATMEL_AES
>> and lose all its selects.
>>
>
> How about getting rid of CONFIG_CRYPTO_DEV_ATMEL_AUTHENC entirely?
>
mm, we can't do this because atmel-aes and atmel-sha are treated as two
separated entities.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC
2019-11-12 7:24 ` [PATCH v2 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC YueHaibing
@ 2019-11-12 12:19 ` Tudor.Ambarus
2019-11-13 9:55 ` [PATCH v3 " YueHaibing
1 sibling, 0 replies; 9+ messages in thread
From: Tudor.Ambarus @ 2019-11-12 12:19 UTC (permalink / raw)
To: yuehaibing, herbert, davem, cyrille.pitchen; +Cc: linux-crypto, linux-kernel
On 11/12/2019 09:24 AM, YueHaibing wrote:
> If CRYPTO_DEV_ATMEL_AUTHENC is m, CRYPTO_DEV_ATMEL_SHA is m,
> but CRYPTO_DEV_ATMEL_AES is y, building will fails:
s/fails/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 depends on CRYPTO_DEV_ATMEL_AES,
s/depends/depend
> and select CRYPTO_DEV_ATMEL_SHA and CRYPTO_AUTHENC for it under there.
>
> Reported-by: Hulk Robot <hulkci@huawei.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>
> ---
> v2: make CRYPTO_DEV_ATMEL_AUTHENC depends on DEV_ATMEL_AES
> ---
> drivers/crypto/Kconfig | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index c5cc04d..296e829 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -492,10 +492,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,8 +506,9 @@ config CRYPTO_DEV_ATMEL_AES
> depends on ARCH_AT91 || COMPILE_TEST
> select CRYPTO_AES
> select CRYPTO_AEAD
> - select CRYPTO_AUTHENC
> select CRYPTO_SKCIPHER
> + 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
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC
2019-11-12 7:24 ` [PATCH v2 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC YueHaibing
2019-11-12 12:19 ` Tudor.Ambarus
@ 2019-11-13 9:55 ` YueHaibing
2019-11-22 11:02 ` Herbert Xu
1 sibling, 1 reply; 9+ messages in thread
From: YueHaibing @ 2019-11-13 9:55 UTC (permalink / raw)
To: herbert, davem, cyrille.pitchen; +Cc: linux-crypto, linux-kernel, YueHaibing
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>
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>
---
v3: fix log typo
v2: make CRYPTO_DEV_ATMEL_AUTHENC depends on DEV_ATMEL_AES
---
drivers/crypto/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index c5cc04d..296e829 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -492,10 +492,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,8 +506,9 @@ config CRYPTO_DEV_ATMEL_AES
depends on ARCH_AT91 || COMPILE_TEST
select CRYPTO_AES
select CRYPTO_AEAD
- select CRYPTO_AUTHENC
select CRYPTO_SKCIPHER
+ 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.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC
2019-11-13 9:55 ` [PATCH v3 " YueHaibing
@ 2019-11-22 11:02 ` Herbert Xu
0 siblings, 0 replies; 9+ messages in thread
From: Herbert Xu @ 2019-11-22 11:02 UTC (permalink / raw)
To: YueHaibing; +Cc: davem, cyrille.pitchen, linux-crypto, linux-kernel
On Wed, Nov 13, 2019 at 05:55:50PM +0800, YueHaibing wrote:
> 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>
> 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>
> ---
> v3: fix log typo
> v2: make CRYPTO_DEV_ATMEL_AUTHENC depends on DEV_ATMEL_AES
> ---
> drivers/crypto/Kconfig | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-11-22 11:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 13:39 [PATCH -next] crypto: atmel - Fix randbuild error YueHaibing
2019-11-12 2:13 ` Herbert Xu
2019-11-12 2:15 ` Herbert Xu
2019-11-12 11:56 ` Tudor.Ambarus
2019-11-12 12:16 ` Tudor.Ambarus
2019-11-12 7:24 ` [PATCH v2 -next] crypto: atmel - Fix build error of CRYPTO_AUTHENC YueHaibing
2019-11-12 12:19 ` Tudor.Ambarus
2019-11-13 9:55 ` [PATCH v3 " YueHaibing
2019-11-22 11:02 ` Herbert Xu
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).