All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3.16] crypto: {blk,giv}cipher: Set has_setkey
@ 2016-03-07  3:40 Ben Hutchings
  2016-03-07 10:20 ` Luis Henriques
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2016-03-07  3:40 UTC (permalink / raw)
  To: Luis Henriques; +Cc: stable, Jonas Meurer

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

Commit a1383cd86a06 ("crypto: skcipher - Add crypto_skcipher_has_setkey")
was incorrectly backported to the 3.2.y and 3.16.y stable branches.
We need to set ablkcipher_tfm::has_setkey in the
crypto_init_blkcipher_ops_async() and crypto_init_givcipher_ops()
functions as well as crypto_init_ablkcipher_ops().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -457,6 +457,7 @@ static int crypto_init_givcipher_ops(str
 	crt->givdecrypt = alg->givdecrypt ?: no_givdecrypt;
 	crt->base = __crypto_ablkcipher_cast(tfm);
 	crt->ivsize = alg->ivsize;
+	crt->has_setkey = alg->max_keysize;
 
 	return 0;
 }
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -471,6 +471,7 @@ static int crypto_init_blkcipher_ops_asy
 	}
 	crt->base = __crypto_ablkcipher_cast(tfm);
 	crt->ivsize = alg->ivsize;
+	crt->has_setkey = alg->max_keysize;
 
 	return 0;
 }

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

* Re: [PATCH 3.16] crypto: {blk,giv}cipher: Set has_setkey
  2016-03-07  3:40 [PATCH 3.16] crypto: {blk,giv}cipher: Set has_setkey Ben Hutchings
@ 2016-03-07 10:20 ` Luis Henriques
  0 siblings, 0 replies; 2+ messages in thread
From: Luis Henriques @ 2016-03-07 10:20 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: stable, Jonas Meurer

On Mon, Mar 07, 2016 at 03:40:02AM +0000, Ben Hutchings wrote:
> Commit a1383cd86a06 ("crypto: skcipher - Add crypto_skcipher_has_setkey")
> was incorrectly backported to the 3.2.y and 3.16.y stable branches.
> We need to set ablkcipher_tfm::has_setkey in the
> crypto_init_blkcipher_ops_async() and crypto_init_givcipher_ops()
> functions as well as crypto_init_ablkcipher_ops().
> 
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> --- a/crypto/ablkcipher.c
> +++ b/crypto/ablkcipher.c
> @@ -457,6 +457,7 @@ static int crypto_init_givcipher_ops(str
>  	crt->givdecrypt = alg->givdecrypt ?: no_givdecrypt;
>  	crt->base = __crypto_ablkcipher_cast(tfm);
>  	crt->ivsize = alg->ivsize;
> +	crt->has_setkey = alg->max_keysize;
>  
>  	return 0;
>  }
> --- a/crypto/blkcipher.c
> +++ b/crypto/blkcipher.c
> @@ -471,6 +471,7 @@ static int crypto_init_blkcipher_ops_asy
>  	}
>  	crt->base = __crypto_ablkcipher_cast(tfm);
>  	crt->ivsize = alg->ivsize;
> +	crt->has_setkey = alg->max_keysize;
>  
>  	return 0;
>  }

Thanks Ben, queuing it for the 3.16 kernel.

Cheers,
--
Lu�s

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

end of thread, other threads:[~2016-03-07 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07  3:40 [PATCH 3.16] crypto: {blk,giv}cipher: Set has_setkey Ben Hutchings
2016-03-07 10:20 ` Luis Henriques

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.