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

Patch for 4.9 upstream:

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.

Signed-off-by: Su Kang Yin <cantona@cantona.net>
---
 drivers/crypto/talitos.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 8b383d3d21c2..05a35ab5595b 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -2636,7 +2636,6 @@ static struct talitos_alg_template driver_algs[] = {
 			.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 |
@@ -2670,6 +2669,7 @@ static struct talitos_alg_template driver_algs[] = {
 			.cra_ablkcipher = {
 				.min_keysize = AES_MIN_KEY_SIZE,
 				.max_keysize = AES_MAX_KEY_SIZE,
+				.ivsize = AES_BLOCK_SIZE,
 				.setkey = ablkcipher_aes_setkey,
 			}
 		},
@@ -2687,7 +2687,6 @@ static struct talitos_alg_template driver_algs[] = {
 			.cra_ablkcipher = {
 				.min_keysize = DES_KEY_SIZE,
 				.max_keysize = DES_KEY_SIZE,
-				.ivsize = DES_BLOCK_SIZE,
 			}
 		},
 		.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2720,7 +2719,6 @@ static struct talitos_alg_template driver_algs[] = {
 			.cra_ablkcipher = {
 				.min_keysize = DES3_EDE_KEY_SIZE,
 				.max_keysize = DES3_EDE_KEY_SIZE,
-				.ivsize = DES3_EDE_BLOCK_SIZE,
 			}
 		},
 		.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
-- 
2.21.0


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

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

Hi,

Le 11/06/2020 à 12:07, Su Kang Yin a écrit :
> Patch for 4.9 upstream:
> 
> commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> wrongly modified CBC algs ivsize instead of ECB aggs ivsize.

To make it clear and avoid this problem to happen again, please generate 
your patch with option -U8

> 
> This restore the CBC algs original ivsize of removes ECB's ones.
> 
> Signed-off-by: Su Kang Yin <cantona@cantona.net>

I think it should include a Fixes: tag.

> ---
>   drivers/crypto/talitos.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
> index 8b383d3d21c2..05a35ab5595b 100644
> --- a/drivers/crypto/talitos.c
> +++ b/drivers/crypto/talitos.c
> @@ -2636,7 +2636,6 @@ static struct talitos_alg_template driver_algs[] = {
>   			.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 |
> @@ -2670,6 +2669,7 @@ static struct talitos_alg_template driver_algs[] = {
>   			.cra_ablkcipher = {
>   				.min_keysize = AES_MIN_KEY_SIZE,
>   				.max_keysize = AES_MAX_KEY_SIZE,
> +				.ivsize = AES_BLOCK_SIZE,
>   				.setkey = ablkcipher_aes_setkey,
>   			}
>   		},
> @@ -2687,7 +2687,6 @@ static struct talitos_alg_template driver_algs[] = {
>   			.cra_ablkcipher = {
>   				.min_keysize = DES_KEY_SIZE,
>   				.max_keysize = DES_KEY_SIZE,
> -				.ivsize = DES_BLOCK_SIZE,

This change has no link with e1de42fdfc6a

>   			}
>   		},
>   		.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
> @@ -2720,7 +2719,6 @@ static struct talitos_alg_template driver_algs[] = {
>   			.cra_ablkcipher = {
>   				.min_keysize = DES3_EDE_KEY_SIZE,
>   				.max_keysize = DES3_EDE_KEY_SIZE,
> -				.ivsize = DES3_EDE_BLOCK_SIZE,

This change has no link with e1de42fdfc6a

>   			}
>   		},
>   		.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
> 

Christophe

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

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

On Thu, Jun 11, 2020 at 06:07:45PM +0800, Su Kang Yin wrote:
> Patch for 4.9 upstream:
> 
> 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.
> 
> Signed-off-by: Su Kang Yin <cantona@cantona.net>
> ---
>  drivers/crypto/talitos.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Nice catch, sorry about that, patch now queued up.

greg k-h

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

* Re: [PATCH] crypto: talitos - fix ECB and CBC algs ivsize
  2020-06-11 10:50 ` Christophe Leroy
@ 2020-06-11 11:03   ` Greg KH
  2020-06-11 11:09     ` Christophe Leroy
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2020-06-11 11:03 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Su Kang Yin, linux-crypto, Herbert Xu, David S. Miller, linux-kernel

On Thu, Jun 11, 2020 at 12:50:24PM +0200, Christophe Leroy wrote:
> Hi,
> 
> Le 11/06/2020 à 12:07, Su Kang Yin a écrit :
> > Patch for 4.9 upstream:
> > 
> > commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> > wrongly modified CBC algs ivsize instead of ECB aggs ivsize.
> 
> To make it clear and avoid this problem to happen again, please generate
> your patch with option -U8

No need, this patch should be fine as-is.

thanks,

greg k-h

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

* Re: [PATCH] crypto: talitos - fix ECB and CBC algs ivsize
  2020-06-11 11:03   ` Greg KH
@ 2020-06-11 11:09     ` Christophe Leroy
  2020-06-11 11:23       ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe Leroy @ 2020-06-11 11:09 UTC (permalink / raw)
  To: Greg KH
  Cc: Su Kang Yin, linux-crypto, Herbert Xu, David S. Miller, linux-kernel



Le 11/06/2020 à 13:03, Greg KH a écrit :
> On Thu, Jun 11, 2020 at 12:50:24PM +0200, Christophe Leroy wrote:
>> Hi,
>>
>> Le 11/06/2020 à 12:07, Su Kang Yin a écrit :
>>> Patch for 4.9 upstream:
>>>
>>> commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
>>> wrongly modified CBC algs ivsize instead of ECB aggs ivsize.
>>
>> To make it clear and avoid this problem to happen again, please generate
>> your patch with option -U8
> 
> No need, this patch should be fine as-is.
> 

Still, this patch includes more than the original patch as far as I can 
see (scroll down and see other comments in that answer)

Christophe

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

* Re: [PATCH] crypto: talitos - fix ECB and CBC algs ivsize
  2020-06-11 11:09     ` Christophe Leroy
@ 2020-06-11 11:23       ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2020-06-11 11:23 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Su Kang Yin, linux-crypto, Herbert Xu, David S. Miller, linux-kernel

On Thu, Jun 11, 2020 at 01:09:38PM +0200, Christophe Leroy wrote:
> 
> 
> Le 11/06/2020 à 13:03, Greg KH a écrit :
> > On Thu, Jun 11, 2020 at 12:50:24PM +0200, Christophe Leroy wrote:
> > > Hi,
> > > 
> > > Le 11/06/2020 à 12:07, Su Kang Yin a écrit :
> > > > Patch for 4.9 upstream:
> > > > 
> > > > commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
> > > > wrongly modified CBC algs ivsize instead of ECB aggs ivsize.
> > > 
> > > To make it clear and avoid this problem to happen again, please generate
> > > your patch with option -U8
> > 
> > No need, this patch should be fine as-is.
> > 
> 
> Still, this patch includes more than the original patch as far as I can see
> (scroll down and see other comments in that answer)

Ah, good catch, I'll go drop this now, thanks!

greg k-h

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

end of thread, other threads:[~2020-06-11 11:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 10:07 [PATCH] crypto: talitos - fix ECB and CBC algs ivsize Su Kang Yin
2020-06-11 10:50 ` Christophe Leroy
2020-06-11 11:03   ` Greg KH
2020-06-11 11:09     ` Christophe Leroy
2020-06-11 11:23       ` Greg KH
2020-06-11 10:54 ` 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).