linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize
@ 2020-06-11 11:50 Su Kang Yin
  2020-06-11 12:07 ` Christophe Leroy
  2020-06-11 13:57 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Su Kang Yin @ 2020-06-11 11:50 UTC (permalink / raw)
  To: gregkh, linux-crypto, christophe.leroy, stable
  Cc: Su Kang Yin, Herbert Xu, David S. Miller, linux-kernel

commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
wrongly modified CBC algs ivsize instead of ECB aggs ivsize.

This restore the CBC algs original ivsize of removes ECB's ones.

Fixes: e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
Signed-off-by: Su Kang Yin <cantona@cantona.net>
---
Patch for 4.9 upstream.
---
 drivers/crypto/talitos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 8b383d3d21c2..059c2d4ad18f 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -2631,17 +2631,16 @@ static struct talitos_alg_template driver_algs[] = {
 			.cra_name = "ecb(aes)",
 			.cra_driver_name = "ecb-aes-talitos",
 			.cra_blocksize = AES_BLOCK_SIZE,
 			.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
 				     CRYPTO_ALG_ASYNC,
 			.cra_ablkcipher = {
 				.min_keysize = AES_MIN_KEY_SIZE,
 				.max_keysize = AES_MAX_KEY_SIZE,
-				.ivsize = AES_BLOCK_SIZE,
 			}
 		},
 		.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
 				     DESC_HDR_SEL0_AESU,
 	},
 	{	.type = CRYPTO_ALG_TYPE_ABLKCIPHER,
 		.alg.crypto = {
 			.cra_name = "cbc(aes)",
@@ -2665,16 +2664,17 @@ static struct talitos_alg_template driver_algs[] = {
 			.cra_name = "ctr(aes)",
 			.cra_driver_name = "ctr-aes-talitos",
 			.cra_blocksize = 1,
 			.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
 				     CRYPTO_ALG_ASYNC,
 			.cra_ablkcipher = {
 				.min_keysize = AES_MIN_KEY_SIZE,
 				.max_keysize = AES_MAX_KEY_SIZE,
+				.ivsize = AES_BLOCK_SIZE,
 				.setkey = ablkcipher_aes_setkey,
 			}
 		},
 		.desc_hdr_template = DESC_HDR_TYPE_AESU_CTR_NONSNOOP |
 				     DESC_HDR_SEL0_AESU |
 				     DESC_HDR_MODE0_AESU_CTR,
 	},
 	{	.type = CRYPTO_ALG_TYPE_ABLKCIPHER,
-- 
2.21.0


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

* Re: [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize
  2020-06-11 11:50 [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize Su Kang Yin
@ 2020-06-11 12:07 ` Christophe Leroy
  2020-06-11 13:57 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Christophe Leroy @ 2020-06-11 12:07 UTC (permalink / raw)
  To: Su Kang Yin, gregkh, linux-crypto, christophe.leroy, stable
  Cc: Herbert Xu, David S. Miller, linux-kernel



Le 11/06/2020 à 13:50, Su Kang Yin a écrit :
> commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> wrongly modified CBC algs ivsize instead of ECB aggs ivsize.
> 
> This restore the CBC algs original ivsize of removes ECB's ones.
> 
> Fixes: e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> Signed-off-by: Su Kang Yin <cantona@cantona.net>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
> Patch for 4.9 upstream.
> ---
>   drivers/crypto/talitos.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
> index 8b383d3d21c2..059c2d4ad18f 100644
> --- a/drivers/crypto/talitos.c
> +++ b/drivers/crypto/talitos.c
> @@ -2631,17 +2631,16 @@ static struct talitos_alg_template driver_algs[] = {
>   			.cra_name = "ecb(aes)",
>   			.cra_driver_name = "ecb-aes-talitos",
>   			.cra_blocksize = AES_BLOCK_SIZE,
>   			.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
>   				     CRYPTO_ALG_ASYNC,
>   			.cra_ablkcipher = {
>   				.min_keysize = AES_MIN_KEY_SIZE,
>   				.max_keysize = AES_MAX_KEY_SIZE,
> -				.ivsize = AES_BLOCK_SIZE,
>   			}
>   		},
>   		.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
>   				     DESC_HDR_SEL0_AESU,
>   	},
>   	{	.type = CRYPTO_ALG_TYPE_ABLKCIPHER,
>   		.alg.crypto = {
>   			.cra_name = "cbc(aes)",
> @@ -2665,16 +2664,17 @@ static struct talitos_alg_template driver_algs[] = {
>   			.cra_name = "ctr(aes)",
>   			.cra_driver_name = "ctr-aes-talitos",
>   			.cra_blocksize = 1,
>   			.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
>   				     CRYPTO_ALG_ASYNC,
>   			.cra_ablkcipher = {
>   				.min_keysize = AES_MIN_KEY_SIZE,
>   				.max_keysize = AES_MAX_KEY_SIZE,
> +				.ivsize = AES_BLOCK_SIZE,
>   				.setkey = ablkcipher_aes_setkey,
>   			}
>   		},
>   		.desc_hdr_template = DESC_HDR_TYPE_AESU_CTR_NONSNOOP |
>   				     DESC_HDR_SEL0_AESU |
>   				     DESC_HDR_MODE0_AESU_CTR,
>   	},
>   	{	.type = CRYPTO_ALG_TYPE_ABLKCIPHER,
> 

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

* Re: [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize
  2020-06-11 11:50 [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize Su Kang Yin
  2020-06-11 12:07 ` Christophe Leroy
@ 2020-06-11 13:57 ` Greg KH
  2020-06-12  2:03   ` Kang Yin Su
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2020-06-11 13:57 UTC (permalink / raw)
  To: Su Kang Yin
  Cc: linux-crypto, christophe.leroy, stable, Herbert Xu,
	David S. Miller, linux-kernel

On Thu, Jun 11, 2020 at 07:50:47PM +0800, Su Kang Yin wrote:
> commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> wrongly modified CBC algs ivsize instead of ECB aggs ivsize.
> 
> This restore the CBC algs original ivsize of removes ECB's ones.
> 
> Fixes: e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> Signed-off-by: Su Kang Yin <cantona@cantona.net>
> ---
> Patch for 4.9 upstream.

Also seems to be an issue for the 4.14 and 4.19 backport, so I'll queue
it up there too, thanks!

greg k-h

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

* Re: [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize
  2020-06-11 13:57 ` Greg KH
@ 2020-06-12  2:03   ` Kang Yin Su
  0 siblings, 0 replies; 4+ messages in thread
From: Kang Yin Su @ 2020-06-12  2:03 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-crypto, christophe.leroy, stable, Herbert Xu,
	David S. Miller, linux-kernel

Cool, thanks!

yin

On Thu, 11 Jun 2020 at 21:57, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Thu, Jun 11, 2020 at 07:50:47PM +0800, Su Kang Yin wrote:
> > commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> > wrongly modified CBC algs ivsize instead of ECB aggs ivsize.
> >
> > This restore the CBC algs original ivsize of removes ECB's ones.
> >
> > Fixes: e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> > Signed-off-by: Su Kang Yin <cantona@cantona.net>
> > ---
> > Patch for 4.9 upstream.
>
> Also seems to be an issue for the 4.14 and 4.19 backport, so I'll queue
> it up there too, thanks!
>
> greg k-h

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

end of thread, other threads:[~2020-06-12  2:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 11:50 [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize Su Kang Yin
2020-06-11 12:07 ` Christophe Leroy
2020-06-11 13:57 ` Greg KH
2020-06-12  2:03   ` Kang Yin Su

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