* [PATCH -next] crypto: hisilicon: select CRYPTO_LIB_DES while compiling SEC driver
@ 2019-08-26 11:59 Mao Wenan
2019-08-27 12:57 ` Jonathan Cameron
0 siblings, 1 reply; 5+ messages in thread
From: Mao Wenan @ 2019-08-26 11:59 UTC (permalink / raw)
To: herbert, davem, wangzhou1, liguozhu, john.garry, Jonathan.Cameron
Cc: linux-crypto, linux-kernel, kernel-janitors, Mao Wenan
When CRYPTO_DEV_HISI_SEC=y, below compilation error is found after
'commit 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")':
drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_cbc':
sec_algs.c:(.text+0x11f0): undefined reference to `des_expand_key'
drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_ecb':
sec_algs.c:(.text+0x1390): undefined reference to `des_expand_key'
make: *** [vmlinux] Error 1
This because DES library has been moved to lib/crypto in this commit
'04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")'.
Fix this by selecting CRYPTO_LIB_DES in CRYPTO_DEV_HISI_SEC.
Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
Fixes: 04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")
Fixes: 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")
Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
drivers/crypto/hisilicon/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
index fa8aa06..ebaf91e 100644
--- a/drivers/crypto/hisilicon/Kconfig
+++ b/drivers/crypto/hisilicon/Kconfig
@@ -4,6 +4,7 @@ config CRYPTO_DEV_HISI_SEC
tristate "Support for Hisilicon SEC crypto block cipher accelerator"
select CRYPTO_BLKCIPHER
select CRYPTO_ALGAPI
+ select CRYPTO_LIB_DES
select SG_SPLIT
depends on ARM64 || COMPILE_TEST
depends on HAS_IOMEM
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH -next] crypto: hisilicon: select CRYPTO_LIB_DES while compiling SEC driver
2019-08-26 11:59 [PATCH -next] crypto: hisilicon: select CRYPTO_LIB_DES while compiling SEC driver Mao Wenan
@ 2019-08-27 12:57 ` Jonathan Cameron
2019-08-28 5:47 ` maowenan
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2019-08-27 12:57 UTC (permalink / raw)
To: Mao Wenan
Cc: herbert, davem, wangzhou1, liguozhu, john.garry, linux-crypto,
linux-kernel, kernel-janitors
On Mon, 26 Aug 2019 19:59:14 +0800
Mao Wenan <maowenan@huawei.com> wrote:
> When CRYPTO_DEV_HISI_SEC=y, below compilation error is found after
> 'commit 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")':
>
> drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_cbc':
> sec_algs.c:(.text+0x11f0): undefined reference to `des_expand_key'
> drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_ecb':
> sec_algs.c:(.text+0x1390): undefined reference to `des_expand_key'
> make: *** [vmlinux] Error 1
>
> This because DES library has been moved to lib/crypto in this commit
> '04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")'.
> Fix this by selecting CRYPTO_LIB_DES in CRYPTO_DEV_HISI_SEC.
>
> Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
> Fixes: 04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")
> Fixes: 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")
>
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
Ah. It's that that third one that really introduced the dependency so possibly
only that one should be listed with a fixes tag. However the right fix
at that point was to select CRYPTO_DES which then changed to CRYPTO_LIB_DES
only after the second patch.
It's not a fix for the first patch so that should probably not be there.
Otherwise, looks correct to me.
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
thanks,
Jonathan
> ---
> drivers/crypto/hisilicon/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
> index fa8aa06..ebaf91e 100644
> --- a/drivers/crypto/hisilicon/Kconfig
> +++ b/drivers/crypto/hisilicon/Kconfig
> @@ -4,6 +4,7 @@ config CRYPTO_DEV_HISI_SEC
> tristate "Support for Hisilicon SEC crypto block cipher accelerator"
> select CRYPTO_BLKCIPHER
> select CRYPTO_ALGAPI
> + select CRYPTO_LIB_DES
> select SG_SPLIT
> depends on ARM64 || COMPILE_TEST
> depends on HAS_IOMEM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] crypto: hisilicon: select CRYPTO_LIB_DES while compiling SEC driver
2019-08-27 12:57 ` Jonathan Cameron
@ 2019-08-28 5:47 ` maowenan
2019-08-28 8:07 ` [PATCH v2 " Mao Wenan
0 siblings, 1 reply; 5+ messages in thread
From: maowenan @ 2019-08-28 5:47 UTC (permalink / raw)
To: Jonathan Cameron
Cc: herbert, davem, wangzhou1, liguozhu, john.garry, linux-crypto,
linux-kernel, kernel-janitors
On 2019/8/27 20:57, Jonathan Cameron wrote:
> On Mon, 26 Aug 2019 19:59:14 +0800
> Mao Wenan <maowenan@huawei.com> wrote:
>
>> When CRYPTO_DEV_HISI_SEC=y, below compilation error is found after
>> 'commit 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")':
>>
>> drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_cbc':
>> sec_algs.c:(.text+0x11f0): undefined reference to `des_expand_key'
>> drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_ecb':
>> sec_algs.c:(.text+0x1390): undefined reference to `des_expand_key'
>> make: *** [vmlinux] Error 1
>>
>> This because DES library has been moved to lib/crypto in this commit
>> '04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")'.
>> Fix this by selecting CRYPTO_LIB_DES in CRYPTO_DEV_HISI_SEC.
>>
>> Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
>> Fixes: 04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")
>> Fixes: 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")
>>
>> Signed-off-by: Mao Wenan <maowenan@huawei.com>
>
> Ah. It's that that third one that really introduced the dependency so possibly
> only that one should be listed with a fixes tag. However the right fix
> at that point was to select CRYPTO_DES which then changed to CRYPTO_LIB_DES
> only after the second patch.
>
> It's not a fix for the first patch so that should probably not be there.
Thanks, that's right, I will send v2 and keep two fixes,
Fixes: 04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")
Fixes: 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")
then remove fix tag because it only introduces one driver:
Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
>
> Otherwise, looks correct to me.
>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> thanks,
>
> Jonathan
>
>
>
>> ---
>> drivers/crypto/hisilicon/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
>> index fa8aa06..ebaf91e 100644
>> --- a/drivers/crypto/hisilicon/Kconfig
>> +++ b/drivers/crypto/hisilicon/Kconfig
>> @@ -4,6 +4,7 @@ config CRYPTO_DEV_HISI_SEC
>> tristate "Support for Hisilicon SEC crypto block cipher accelerator"
>> select CRYPTO_BLKCIPHER
>> select CRYPTO_ALGAPI
>> + select CRYPTO_LIB_DES
>> select SG_SPLIT
>> depends on ARM64 || COMPILE_TEST
>> depends on HAS_IOMEM
>
>
>
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 -next] crypto: hisilicon: select CRYPTO_LIB_DES while compiling SEC driver
2019-08-28 5:47 ` maowenan
@ 2019-08-28 8:07 ` Mao Wenan
2019-08-30 8:25 ` Herbert Xu
0 siblings, 1 reply; 5+ messages in thread
From: Mao Wenan @ 2019-08-28 8:07 UTC (permalink / raw)
To: herbert, davem, jonathan.cameron, wangzhou1, liguozhu,
john.garry, Jonathan.Cameron
Cc: linux-crypto, linux-kernel, kernel-janitors, Mao Wenan
When CRYPTO_DEV_HISI_SEC=y, below compilation error is found after
'commit 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")':
drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_cbc':
sec_algs.c:(.text+0x11f0): undefined reference to `des_expand_key'
drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_ecb':
sec_algs.c:(.text+0x1390): undefined reference to `des_expand_key'
make: *** [vmlinux] Error 1
This because DES library has been moved to lib/crypto in this commit
'04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")'.
Fix this by selecting CRYPTO_LIB_DES in CRYPTO_DEV_HISI_SEC.
Fixes: 04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")
Fixes: 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")
Signed-off-by: Mao Wenan <maowenan@huawei.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
v2: remove fix tag 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
drivers/crypto/hisilicon/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/hisilicon/Kconfig b/drivers/crypto/hisilicon/Kconfig
index fa8aa06..ebaf91e 100644
--- a/drivers/crypto/hisilicon/Kconfig
+++ b/drivers/crypto/hisilicon/Kconfig
@@ -4,6 +4,7 @@ config CRYPTO_DEV_HISI_SEC
tristate "Support for Hisilicon SEC crypto block cipher accelerator"
select CRYPTO_BLKCIPHER
select CRYPTO_ALGAPI
+ select CRYPTO_LIB_DES
select SG_SPLIT
depends on ARM64 || COMPILE_TEST
depends on HAS_IOMEM
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 -next] crypto: hisilicon: select CRYPTO_LIB_DES while compiling SEC driver
2019-08-28 8:07 ` [PATCH v2 " Mao Wenan
@ 2019-08-30 8:25 ` Herbert Xu
0 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2019-08-30 8:25 UTC (permalink / raw)
To: Mao Wenan
Cc: davem, jonathan.cameron, wangzhou1, liguozhu, john.garry,
linux-crypto, linux-kernel, kernel-janitors
On Wed, Aug 28, 2019 at 04:07:40PM +0800, Mao Wenan wrote:
> When CRYPTO_DEV_HISI_SEC=y, below compilation error is found after
> 'commit 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")':
>
> drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_cbc':
> sec_algs.c:(.text+0x11f0): undefined reference to `des_expand_key'
> drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_ecb':
> sec_algs.c:(.text+0x1390): undefined reference to `des_expand_key'
> make: *** [vmlinux] Error 1
>
> This because DES library has been moved to lib/crypto in this commit
> '04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")'.
> Fix this by selecting CRYPTO_LIB_DES in CRYPTO_DEV_HISI_SEC.
>
> Fixes: 04007b0e6cbb ("crypto: des - split off DES library from generic DES cipher driver")
> Fixes: 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")
>
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> v2: remove fix tag 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
> drivers/crypto/hisilicon/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
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] 5+ messages in thread
end of thread, other threads:[~2019-08-30 8:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-26 11:59 [PATCH -next] crypto: hisilicon: select CRYPTO_LIB_DES while compiling SEC driver Mao Wenan
2019-08-27 12:57 ` Jonathan Cameron
2019-08-28 5:47 ` maowenan
2019-08-28 8:07 ` [PATCH v2 " Mao Wenan
2019-08-30 8:25 ` 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).