From: Anthony Iliopoulos <[email protected]>
[ Upstream commit f7b347acb5f6c29d9229bb64893d8b6a2c7949fb ]
The integrity target relies on skcipher for encryption/decryption, but
certain kernel configurations may not enable CRYPTO_SKCIPHER, leading to
compilation errors due to unresolved symbols. Explicitly select
CRYPTO_SKCIPHER for DM_INTEGRITY, since it is unconditionally dependent
on it.
Signed-off-by: Anthony Iliopoulos <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/md/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 8b8c123cae66f..7d61ef03cb187 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -527,6 +527,7 @@ config DM_INTEGRITY
select BLK_DEV_INTEGRITY
select DM_BUFIO
select CRYPTO
+ select CRYPTO_SKCIPHER
select ASYNC_XOR
---help---
This device-mapper target emulates a block device that has
--
2.27.0
On Mon, Jan 25, 2021 at 07:58:29PM +0100, Pavel Machek wrote:
> Hi!
>
> > From: Anthony Iliopoulos <[email protected]>
> >
> > [ Upstream commit f7b347acb5f6c29d9229bb64893d8b6a2c7949fb ]
> >
> > The integrity target relies on skcipher for encryption/decryption, but
> > certain kernel configurations may not enable CRYPTO_SKCIPHER, leading to
> > compilation errors due to unresolved symbols. Explicitly select
> > CRYPTO_SKCIPHER for DM_INTEGRITY, since it is unconditionally dependent
> > on it.
>
> There is no such config option in 4.19. This patch is not suitable
> here.
>
> grep -r CRYPTO_SKCIPHER .
> ./include/crypto/skcipher.h:#ifndef _CRYPTO_SKCIPHER_H
> ./include/crypto/skcipher.h:#define _CRYPTO_SKCIPHER_H
> ./include/crypto/skcipher.h:#endif /* _CRYPTO_SKCIPHER_H */
This is due to commit b95bba5d0114 ("crypto: skcipher - rename the
crypto_blkcipher module and kconfig option"), which was applied in
v5.5-rc1. As already pointed out in [1], if this is to be backported to
any earlier releases then SKCIPHER needs to be changed to BLKCIPHER.
Best regards,
Anthony
[1] https://lore.kernel.org/lkml/YAfD81Jw%[email protected]/#t
Hi!
> From: Anthony Iliopoulos <[email protected]>
>
> [ Upstream commit f7b347acb5f6c29d9229bb64893d8b6a2c7949fb ]
>
> The integrity target relies on skcipher for encryption/decryption, but
> certain kernel configurations may not enable CRYPTO_SKCIPHER, leading to
> compilation errors due to unresolved symbols. Explicitly select
> CRYPTO_SKCIPHER for DM_INTEGRITY, since it is unconditionally dependent
> on it.
There is no such config option in 4.19. This patch is not suitable
here.
grep -r CRYPTO_SKCIPHER .
./include/crypto/skcipher.h:#ifndef _CRYPTO_SKCIPHER_H
./include/crypto/skcipher.h:#define _CRYPTO_SKCIPHER_H
./include/crypto/skcipher.h:#endif /* _CRYPTO_SKCIPHER_H */
Best regards,
Pavel
> +++ b/drivers/md/Kconfig
> @@ -527,6 +527,7 @@ config DM_INTEGRITY
> select BLK_DEV_INTEGRITY
> select DM_BUFIO
> select CRYPTO
> + select CRYPTO_SKCIPHER
> select ASYNC_XOR
> ---help---
> This device-mapper target emulates a block device that has
--
http://www.livejournal.com/~pavelmachek
On Mon, Jan 25, 2021 at 07:58:29PM +0100, Pavel Machek wrote:
> Hi!
>
> > From: Anthony Iliopoulos <[email protected]>
> >
> > [ Upstream commit f7b347acb5f6c29d9229bb64893d8b6a2c7949fb ]
> >
> > The integrity target relies on skcipher for encryption/decryption, but
> > certain kernel configurations may not enable CRYPTO_SKCIPHER, leading to
> > compilation errors due to unresolved symbols. Explicitly select
> > CRYPTO_SKCIPHER for DM_INTEGRITY, since it is unconditionally dependent
> > on it.
>
> There is no such config option in 4.19. This patch is not suitable
> here.
>
> grep -r CRYPTO_SKCIPHER .
> ./include/crypto/skcipher.h:#ifndef _CRYPTO_SKCIPHER_H
> ./include/crypto/skcipher.h:#define _CRYPTO_SKCIPHER_H
> ./include/crypto/skcipher.h:#endif /* _CRYPTO_SKCIPHER_H */
>
> Best regards,
> Pavel
>
> > +++ b/drivers/md/Kconfig
> > @@ -527,6 +527,7 @@ config DM_INTEGRITY
> > select BLK_DEV_INTEGRITY
> > select DM_BUFIO
> > select CRYPTO
> > + select CRYPTO_SKCIPHER
> > select ASYNC_XOR
> > ---help---
> > This device-mapper target emulates a block device that has
Good catch, now dropped, thanks.
greg k-h