All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] crypto: sun4i-ss: add missing statesize
       [not found] <1447054026-4243-1-git-send-email-clabbe.montjoie@gmail.com>
@ 2015-11-09  7:38   ` Herbert Xu
  0 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-09  7:38 UTC (permalink / raw)
  To: LABBE Corentin
  Cc: davem, maxime.ripard, wens, linux-crypto, linux-arm-kernel, linux-kernel

On Mon, Nov 09, 2015 at 08:27:06AM +0100, LABBE Corentin wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> A recent change make impossible to load them without giving statesize.
> This patch specifiy statesize for sha1 and md5.
> 
> Fixes: 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")

Nack.  As I said this commit is absolutely correct and if you really
have to slap on a fixes header then make it the original changeset
that added the driver.  It's the driver that's broken, not the API.

Cheers,
-- 
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] 34+ messages in thread

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-09  7:38   ` Herbert Xu
  0 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-09  7:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 09, 2015 at 08:27:06AM +0100, LABBE Corentin wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> A recent change make impossible to load them without giving statesize.
> This patch specifiy statesize for sha1 and md5.
> 
> Fixes: 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")

Nack.  As I said this commit is absolutely correct and if you really
have to slap on a fixes header then make it the original changeset
that added the driver.  It's the driver that's broken, not the API.

Cheers,
-- 
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] 34+ messages in thread

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-17 14:27       ` Herbert Xu
@ 2015-11-17 21:51         ` Greg KH
  -1 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2015-11-17 21:51 UTC (permalink / raw)
  To: Herbert Xu
  Cc: LABBE Corentin, davem, linux-arm-kernel, maxime.ripard, wens,
	stable, linux-crypto, linux-kernel

On Tue, Nov 17, 2015 at 10:27:42PM +0800, Herbert Xu wrote:
> On Tue, Nov 17, 2015 at 03:26:03PM +0100, LABBE Corentin wrote:
> >
> > I have lots of user reporting that they cannot use the device since it wont load.
> > For me it need to go stable since it respect all "stable rules", simple, tested, minimal, and fix a real bug that bother people.
> 
> Well it will hit stable eventually.  I just don't feel comfortable
> with sending it in straight away.

You can't send it in "straight away", the rule is that it has to be in
Linus's tree first, don't worry, you are doing it correctly.

thanks,

greg k-h

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-17 21:51         ` Greg KH
  0 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2015-11-17 21:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 17, 2015 at 10:27:42PM +0800, Herbert Xu wrote:
> On Tue, Nov 17, 2015 at 03:26:03PM +0100, LABBE Corentin wrote:
> >
> > I have lots of user reporting that they cannot use the device since it wont load.
> > For me it need to go stable since it respect all "stable rules", simple, tested, minimal, and fix a real bug that bother people.
> 
> Well it will hit stable eventually.  I just don't feel comfortable
> with sending it in straight away.

You can't send it in "straight away", the rule is that it has to be in
Linus's tree first, don't worry, you are doing it correctly.

thanks,

greg k-h

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-17 14:26     ` LABBE Corentin
@ 2015-11-17 14:27       ` Herbert Xu
  -1 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-17 14:27 UTC (permalink / raw)
  To: LABBE Corentin
  Cc: davem, linux-arm-kernel, maxime.ripard, wens, stable,
	linux-crypto, linux-kernel

On Tue, Nov 17, 2015 at 03:26:03PM +0100, LABBE Corentin wrote:
>
> I have lots of user reporting that they cannot use the device since it wont load.
> For me it need to go stable since it respect all "stable rules", simple, tested, minimal, and fix a real bug that bother people.

Well it will hit stable eventually.  I just don't feel comfortable
with sending it in straight away.

Cheers,
-- 
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] 34+ messages in thread

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-17 14:27       ` Herbert Xu
  0 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-17 14:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 17, 2015 at 03:26:03PM +0100, LABBE Corentin wrote:
>
> I have lots of user reporting that they cannot use the device since it wont load.
> For me it need to go stable since it respect all "stable rules", simple, tested, minimal, and fix a real bug that bother people.

Well it will hit stable eventually.  I just don't feel comfortable
with sending it in straight away.

Cheers,
-- 
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] 34+ messages in thread

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-17 14:09   ` Herbert Xu
@ 2015-11-17 14:26     ` LABBE Corentin
  -1 siblings, 0 replies; 34+ messages in thread
From: LABBE Corentin @ 2015-11-17 14:26 UTC (permalink / raw)
  To: Herbert Xu
  Cc: davem, linux-arm-kernel, maxime.ripard, wens, stable,
	linux-crypto, linux-kernel

On Tue, Nov 17, 2015 at 10:09:38PM +0800, Herbert Xu wrote:
> On Fri, Nov 13, 2015 at 02:10:28PM +0100, LABBE Corentin wrote:
> > sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> > Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
> > made impossible to load them without giving statesize. This patch
> > specifiy statesize for sha1 and md5.
> > 
> > Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
> > Cc: <stable@vger.kernel.org> # v4.3+
> > Tested-by: Chen-Yu Tsai <wens@csie.org>
> > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> 
> Patch applied to cryptodev as I don't think it needs to go into
> stable straight away.  Thanks.

Hello

I have lots of user reporting that they cannot use the device since it wont load.
For me it need to go stable since it respect all "stable rules", simple, tested, minimal, and fix a real bug that bother people.

Thanks in advance.
Regards

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-17 14:26     ` LABBE Corentin
  0 siblings, 0 replies; 34+ messages in thread
From: LABBE Corentin @ 2015-11-17 14:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 17, 2015 at 10:09:38PM +0800, Herbert Xu wrote:
> On Fri, Nov 13, 2015 at 02:10:28PM +0100, LABBE Corentin wrote:
> > sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> > Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
> > made impossible to load them without giving statesize. This patch
> > specifiy statesize for sha1 and md5.
> > 
> > Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
> > Cc: <stable@vger.kernel.org> # v4.3+
> > Tested-by: Chen-Yu Tsai <wens@csie.org>
> > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> 
> Patch applied to cryptodev as I don't think it needs to go into
> stable straight away.  Thanks.

Hello

I have lots of user reporting that they cannot use the device since it wont load.
For me it need to go stable since it respect all "stable rules", simple, tested, minimal, and fix a real bug that bother people.

Thanks in advance.
Regards

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-13 13:10 ` LABBE Corentin
@ 2015-11-17 14:09   ` Herbert Xu
  -1 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-17 14:09 UTC (permalink / raw)
  To: LABBE Corentin
  Cc: davem, linux-arm-kernel, maxime.ripard, wens, stable,
	linux-crypto, linux-kernel

On Fri, Nov 13, 2015 at 02:10:28PM +0100, LABBE Corentin wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
> made impossible to load them without giving statesize. This patch
> specifiy statesize for sha1 and md5.
> 
> Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
> Cc: <stable@vger.kernel.org> # v4.3+
> Tested-by: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>

Patch applied to cryptodev as I don't think it needs to go into
stable straight away.  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] 34+ messages in thread

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-17 14:09   ` Herbert Xu
  0 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-17 14:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 13, 2015 at 02:10:28PM +0100, LABBE Corentin wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
> made impossible to load them without giving statesize. This patch
> specifiy statesize for sha1 and md5.
> 
> Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
> Cc: <stable@vger.kernel.org> # v4.3+
> Tested-by: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>

Patch applied to cryptodev as I don't think it needs to go into
stable straight away.  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] 34+ messages in thread

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-13 13:10 ` LABBE Corentin
  0 siblings, 0 replies; 34+ messages in thread
From: LABBE Corentin @ 2015-11-13 13:10 UTC (permalink / raw)
  To: clabbe.montjoie, davem, herbert, linux-arm-kernel, maxime.ripard, wens
  Cc: stable, linux-crypto, linux-kernel

sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
made impossible to load them without giving statesize. This patch
specifiy statesize for sha1 and md5.

Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
Cc: <stable@vger.kernel.org> # v4.3+
Tested-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
index eab6fe2..107cd2a 100644
--- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
@@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_md5,
 		.halg = {
 			.digestsize = MD5_DIGEST_SIZE,
+			.statesize = sizeof(struct md5_state),
 			.base = {
 				.cra_name = "md5",
 				.cra_driver_name = "md5-sun4i-ss",
@@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_sha1,
 		.halg = {
 			.digestsize = SHA1_DIGEST_SIZE,
+			.statesize = sizeof(struct sha1_state),
 			.base = {
 				.cra_name = "sha1",
 				.cra_driver_name = "sha1-sun4i-ss",
-- 
2.4.10

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-13 13:10 ` LABBE Corentin
  0 siblings, 0 replies; 34+ messages in thread
From: LABBE Corentin @ 2015-11-13 13:10 UTC (permalink / raw)
  To: linux-arm-kernel

sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
made impossible to load them without giving statesize. This patch
specifiy statesize for sha1 and md5.

Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
Cc: <stable@vger.kernel.org> # v4.3+
Tested-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
index eab6fe2..107cd2a 100644
--- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
@@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_md5,
 		.halg = {
 			.digestsize = MD5_DIGEST_SIZE,
+			.statesize = sizeof(struct md5_state),
 			.base = {
 				.cra_name = "md5",
 				.cra_driver_name = "md5-sun4i-ss",
@@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_sha1,
 		.halg = {
 			.digestsize = SHA1_DIGEST_SIZE,
+			.statesize = sizeof(struct sha1_state),
 			.base = {
 				.cra_name = "sha1",
 				.cra_driver_name = "sha1-sun4i-ss",
-- 
2.4.10

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-09  3:58               ` Herbert Xu
  (?)
@ 2015-11-11 22:22                   ` Maxime Ripard
  -1 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-11 22:22 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Christoph Biedl, clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, wens-jdAy2FN1RRM,
	linux-crypto-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	stable-u79uwXL29TY76Z2rM5mHXA

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

On Mon, Nov 09, 2015 at 11:58:48AM +0800, Herbert Xu wrote:
> Christoph Biedl <linux-kernel.bfrz-o6iJJGtClBpGEOBiBlW9YYQuADTiUCJX@public.gmane.org> wrote:
> >
> > Fixes: should rather point to the commit that caused the breakage in my
> > opinion. Which did this by intention:
> 
> Absolutely not.  That patch is correct and if you revert that
> you will simply end up registering a broken driver into the system
> that may then lead to crashes that can be triggered from user-space.

Yeah my point was that the commit log should be something like

"""
sun4i-ss implementaton of md5/sha1 is via ahash algorithms.

Commit 8996eafdcbad ('crypto: ahash - ensure statesize is non-zero')
made impossible to load them without giving statesize. This patch
specifiy statesize for sha1 and md5.

Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
"""

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-11 22:22                   ` Maxime Ripard
  0 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-11 22:22 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Christoph Biedl, clabbe.montjoie, davem, wens, linux-crypto,
	linux-arm-kernel, linux-kernel, linux-sunxi, stable

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

On Mon, Nov 09, 2015 at 11:58:48AM +0800, Herbert Xu wrote:
> Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de> wrote:
> >
> > Fixes: should rather point to the commit that caused the breakage in my
> > opinion. Which did this by intention:
> 
> Absolutely not.  That patch is correct and if you revert that
> you will simply end up registering a broken driver into the system
> that may then lead to crashes that can be triggered from user-space.

Yeah my point was that the commit log should be something like

"""
sun4i-ss implementaton of md5/sha1 is via ahash algorithms.

Commit 8996eafdcbad ('crypto: ahash - ensure statesize is non-zero')
made impossible to load them without giving statesize. This patch
specifiy statesize for sha1 and md5.

Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
"""

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-11 22:22                   ` Maxime Ripard
  0 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-11 22:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 09, 2015 at 11:58:48AM +0800, Herbert Xu wrote:
> Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de> wrote:
> >
> > Fixes: should rather point to the commit that caused the breakage in my
> > opinion. Which did this by intention:
> 
> Absolutely not.  That patch is correct and if you revert that
> you will simply end up registering a broken driver into the system
> that may then lead to crashes that can be triggered from user-space.

Yeah my point was that the commit log should be something like

"""
sun4i-ss implementaton of md5/sha1 is via ahash algorithms.

Commit 8996eafdcbad ('crypto: ahash - ensure statesize is non-zero')
made impossible to load them without giving statesize. This patch
specifiy statesize for sha1 and md5.

Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
"""

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151111/a7e0287d/attachment-0001.sig>

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-08 18:22             ` Christoph Biedl
@ 2015-11-09  3:58               ` Herbert Xu
  -1 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-09  3:58 UTC (permalink / raw)
  To: Christoph Biedl
  Cc: maxime.ripard, clabbe.montjoie, davem, wens, linux-crypto,
	linux-arm-kernel, linux-kernel, linux-sunxi, stable

Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de> wrote:
>
> Fixes: should rather point to the commit that caused the breakage in my
> opinion. Which did this by intention:

Absolutely not.  That patch is correct and if you revert that
you will simply end up registering a broken driver into the system
that may then lead to crashes that can be triggered from user-space.

> | commit 8996eafdcbad149ac0f772fb1649fbb75c482a6a
> | Author: Russell King <rmk+kernel@arm.linux.org.uk>
> | Date:   Fri Oct 9 20:43:33 2015 +0100
> | 
> |     crypto: ahash - ensure statesize is non-zero
> (...)
> +     This patch adds a check to prevent these drivers from registering
> +     ahash algorithms until they are fixed.

Cheers,
-- 
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] 34+ messages in thread

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-09  3:58               ` Herbert Xu
  0 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-09  3:58 UTC (permalink / raw)
  To: linux-arm-kernel

Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de> wrote:
>
> Fixes: should rather point to the commit that caused the breakage in my
> opinion. Which did this by intention:

Absolutely not.  That patch is correct and if you revert that
you will simply end up registering a broken driver into the system
that may then lead to crashes that can be triggered from user-space.

> | commit 8996eafdcbad149ac0f772fb1649fbb75c482a6a
> | Author: Russell King <rmk+kernel@arm.linux.org.uk>
> | Date:   Fri Oct 9 20:43:33 2015 +0100
> | 
> |     crypto: ahash - ensure statesize is non-zero
> (...)
> +     This patch adds a check to prevent these drivers from registering
> +     ahash algorithms until they are fixed.

Cheers,
-- 
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] 34+ messages in thread

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-08 17:50           ` Maxime Ripard
@ 2015-11-08 18:22             ` Christoph Biedl
  -1 siblings, 0 replies; 34+ messages in thread
From: Christoph Biedl @ 2015-11-08 18:22 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Herbert Xu, LABBE Corentin, davem, wens, linux-crypto,
	linux-arm-kernel, linux-kernel, linux-sunxi, stable

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

Maxime Ripard wrote...

> > > > This patch specifiy statesize for sha1 and md5.
> > > > 
> > > > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> > > > Cc: stable@vger.kernel.org
> > > 
> > > Please also add a Fixes tag (and the stable version it applies to).
> > 
> > I don't see the point for a fixes tag as it would simply refer
> > to the original patch-set that added the driver.
> 
> What's the problem with that?

Fixes: should rather point to the commit that caused the breakage in my
opinion. Which did this by intention:

| commit 8996eafdcbad149ac0f772fb1649fbb75c482a6a
| Author: Russell King <rmk+kernel@arm.linux.org.uk>
| Date:   Fri Oct 9 20:43:33 2015 +0100
| 
|     crypto: ahash - ensure statesize is non-zero
(...)
+     This patch adds a check to prevent these drivers from registering
+     ahash algorithms until they are fixed.

Another crypto subsystem (mv_cesa) suffers from the same problem. I
have a patch ready but would prefer a consensus on these formalities
before submitting.

Aside from this, if you really need another Tested-by:, add me. And
also Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107281

    Christoph

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

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-08 18:22             ` Christoph Biedl
  0 siblings, 0 replies; 34+ messages in thread
From: Christoph Biedl @ 2015-11-08 18:22 UTC (permalink / raw)
  To: linux-arm-kernel

Maxime Ripard wrote...

> > > > This patch specifiy statesize for sha1 and md5.
> > > > 
> > > > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> > > > Cc: stable at vger.kernel.org
> > > 
> > > Please also add a Fixes tag (and the stable version it applies to).
> > 
> > I don't see the point for a fixes tag as it would simply refer
> > to the original patch-set that added the driver.
> 
> What's the problem with that?

Fixes: should rather point to the commit that caused the breakage in my
opinion. Which did this by intention:

| commit 8996eafdcbad149ac0f772fb1649fbb75c482a6a
| Author: Russell King <rmk+kernel@arm.linux.org.uk>
| Date:   Fri Oct 9 20:43:33 2015 +0100
| 
|     crypto: ahash - ensure statesize is non-zero
(...)
+     This patch adds a check to prevent these drivers from registering
+     ahash algorithms until they are fixed.

Another crypto subsystem (mv_cesa) suffers from the same problem. I
have a patch ready but would prefer a consensus on these formalities
before submitting.

Aside from this, if you really need another Tested-by:, add me. And
also Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107281

    Christoph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151108/2e54c0cc/attachment.sig>

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-06  4:56       ` Herbert Xu
  (?)
@ 2015-11-08 17:50           ` Maxime Ripard
  -1 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-08 17:50 UTC (permalink / raw)
  To: Herbert Xu
  Cc: LABBE Corentin, davem-fT/PcQaiUtIeIZ0/mPfg9Q, wens-jdAy2FN1RRM,
	linux-crypto-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	stable-u79uwXL29TY76Z2rM5mHXA

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

On Fri, Nov 06, 2015 at 12:56:39PM +0800, Herbert Xu wrote:
> On Thu, Nov 05, 2015 at 08:07:19AM -0800, Maxime Ripard wrote:
> > 
> > On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> > > sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> > > A recent change make impossible to load them without giving statesize.
> > 
> > Which one?
> 
> We recently disabled ahash drivers that do not declare statesize
> because it can lead to a crash when the driver is used through
> algif.

"Recently" is relative and really doesn't help.

Having the commit ID that made this change is an absolute reference,
and really helps to identify when that behaviour changed.

> Not declaring statesize is a bug anyway but the fact that it
> is exported through algif makes it much worse.
> 
> > > This patch specifiy statesize for sha1 and md5.
> > > 
> > > Signed-off-by: LABBE Corentin <clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > 
> > Please also add a Fixes tag (and the stable version it applies to).
> 
> I don't see the point for a fixes tag as it would simply refer
> to the original patch-set that added the driver.

What's the problem with that?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-08 17:50           ` Maxime Ripard
  0 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-08 17:50 UTC (permalink / raw)
  To: Herbert Xu
  Cc: LABBE Corentin, davem, wens, linux-crypto, linux-arm-kernel,
	linux-kernel, linux-sunxi, stable

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

On Fri, Nov 06, 2015 at 12:56:39PM +0800, Herbert Xu wrote:
> On Thu, Nov 05, 2015 at 08:07:19AM -0800, Maxime Ripard wrote:
> > 
> > On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> > > sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> > > A recent change make impossible to load them without giving statesize.
> > 
> > Which one?
> 
> We recently disabled ahash drivers that do not declare statesize
> because it can lead to a crash when the driver is used through
> algif.

"Recently" is relative and really doesn't help.

Having the commit ID that made this change is an absolute reference,
and really helps to identify when that behaviour changed.

> Not declaring statesize is a bug anyway but the fact that it
> is exported through algif makes it much worse.
> 
> > > This patch specifiy statesize for sha1 and md5.
> > > 
> > > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> > > Cc: stable@vger.kernel.org
> > 
> > Please also add a Fixes tag (and the stable version it applies to).
> 
> I don't see the point for a fixes tag as it would simply refer
> to the original patch-set that added the driver.

What's the problem with that?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-08 17:50           ` Maxime Ripard
  0 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-08 17:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 06, 2015 at 12:56:39PM +0800, Herbert Xu wrote:
> On Thu, Nov 05, 2015 at 08:07:19AM -0800, Maxime Ripard wrote:
> > 
> > On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> > > sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> > > A recent change make impossible to load them without giving statesize.
> > 
> > Which one?
> 
> We recently disabled ahash drivers that do not declare statesize
> because it can lead to a crash when the driver is used through
> algif.

"Recently" is relative and really doesn't help.

Having the commit ID that made this change is an absolute reference,
and really helps to identify when that behaviour changed.

> Not declaring statesize is a bug anyway but the fact that it
> is exported through algif makes it much worse.
> 
> > > This patch specifiy statesize for sha1 and md5.
> > > 
> > > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> > > Cc: stable at vger.kernel.org
> > 
> > Please also add a Fixes tag (and the stable version it applies to).
> 
> I don't see the point for a fixes tag as it would simply refer
> to the original patch-set that added the driver.

What's the problem with that?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151108/4a203d5f/attachment.sig>

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-05 16:07     ` Maxime Ripard
  (?)
@ 2015-11-06  4:56       ` Herbert Xu
  -1 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-06  4:56 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: LABBE Corentin, davem-fT/PcQaiUtIeIZ0/mPfg9Q, wens-jdAy2FN1RRM,
	linux-crypto-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	stable-u79uwXL29TY76Z2rM5mHXA

On Thu, Nov 05, 2015 at 08:07:19AM -0800, Maxime Ripard wrote:
> 
> On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> > sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> > A recent change make impossible to load them without giving statesize.
> 
> Which one?

We recently disabled ahash drivers that do not declare statesize
because it can lead to a crash when the driver is used through
algif.

Not declaring statesize is a bug anyway but the fact that it
is exported through algif makes it much worse.

> > This patch specifiy statesize for sha1 and md5.
> > 
> > Signed-off-by: LABBE Corentin <clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> 
> Please also add a Fixes tag (and the stable version it applies to).

I don't see the point for a fixes tag as it would simply refer
to the original patch-set that added the driver.

Cheers,
-- 
Email: Herbert Xu <herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-06  4:56       ` Herbert Xu
  0 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-06  4:56 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: LABBE Corentin, davem, wens, linux-crypto, linux-arm-kernel,
	linux-kernel, linux-sunxi, stable

On Thu, Nov 05, 2015 at 08:07:19AM -0800, Maxime Ripard wrote:
> 
> On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> > sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> > A recent change make impossible to load them without giving statesize.
> 
> Which one?

We recently disabled ahash drivers that do not declare statesize
because it can lead to a crash when the driver is used through
algif.

Not declaring statesize is a bug anyway but the fact that it
is exported through algif makes it much worse.

> > This patch specifiy statesize for sha1 and md5.
> > 
> > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> > Cc: stable@vger.kernel.org
> 
> Please also add a Fixes tag (and the stable version it applies to).

I don't see the point for a fixes tag as it would simply refer
to the original patch-set that added the driver.

Cheers,
-- 
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] 34+ messages in thread

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-06  4:56       ` Herbert Xu
  0 siblings, 0 replies; 34+ messages in thread
From: Herbert Xu @ 2015-11-06  4:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 05, 2015 at 08:07:19AM -0800, Maxime Ripard wrote:
> 
> On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> > sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> > A recent change make impossible to load them without giving statesize.
> 
> Which one?

We recently disabled ahash drivers that do not declare statesize
because it can lead to a crash when the driver is used through
algif.

Not declaring statesize is a bug anyway but the fact that it
is exported through algif makes it much worse.

> > This patch specifiy statesize for sha1 and md5.
> > 
> > Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> > Cc: stable at vger.kernel.org
> 
> Please also add a Fixes tag (and the stable version it applies to).

I don't see the point for a fixes tag as it would simply refer
to the original patch-set that added the driver.

Cheers,
-- 
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] 34+ messages in thread

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-05  7:48 ` LABBE Corentin
  (?)
@ 2015-11-05 16:07     ` Maxime Ripard
  -1 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-05 16:07 UTC (permalink / raw)
  To: LABBE Corentin
  Cc: herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, wens-jdAy2FN1RRM,
	linux-crypto-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	stable-u79uwXL29TY76Z2rM5mHXA

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

Hi,

On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> A recent change make impossible to load them without giving statesize.

Which one?

> This patch specifiy statesize for sha1 and md5.
> 
> Signed-off-by: LABBE Corentin <clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Please also add a Fixes tag (and the stable version it applies to).

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-05 16:07     ` Maxime Ripard
  0 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-05 16:07 UTC (permalink / raw)
  To: LABBE Corentin
  Cc: herbert, davem, wens, linux-crypto, linux-arm-kernel,
	linux-kernel, linux-sunxi, stable

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

Hi,

On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> A recent change make impossible to load them without giving statesize.

Which one?

> This patch specifiy statesize for sha1 and md5.
> 
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> Cc: stable@vger.kernel.org

Please also add a Fixes tag (and the stable version it applies to).

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-05 16:07     ` Maxime Ripard
  0 siblings, 0 replies; 34+ messages in thread
From: Maxime Ripard @ 2015-11-05 16:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Thu, Nov 05, 2015 at 08:48:57AM +0100, LABBE Corentin wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> A recent change make impossible to load them without giving statesize.

Which one?

> This patch specifiy statesize for sha1 and md5.
> 
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> Cc: stable at vger.kernel.org

Please also add a Fixes tag (and the stable version it applies to).

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151105/ae805bb8/attachment.sig>

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

* Re: [PATCH] crypto: sun4i-ss: add missing statesize
  2015-11-05  7:48 ` LABBE Corentin
@ 2015-11-05 10:34   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 34+ messages in thread
From: Chen-Yu Tsai @ 2015-11-05 10:34 UTC (permalink / raw)
  To: LABBE Corentin
  Cc: Herbert Xu, David Miller, Maxime Ripard, Chen-Yu Tsai,
	linux-crypto, linux-arm-kernel, linux-kernel, linux-sunxi,
	stable

On Thu, Nov 5, 2015 at 3:48 PM, LABBE Corentin
<clabbe.montjoie@gmail.com> wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> A recent change make impossible to load them without giving statesize.
> This patch specifiy statesize for sha1 and md5.
>
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> Cc: stable@vger.kernel.org

Confirmed the driver properly loads again.

Tested-by: Chen-Yu Tsai <wens@csie.org>

> ---
>  drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
> index eab6fe2..107cd2a 100644
> --- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
> +++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
> @@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
>                 .import = sun4i_hash_import_md5,
>                 .halg = {
>                         .digestsize = MD5_DIGEST_SIZE,
> +                       .statesize = sizeof(struct md5_state),
>                         .base = {
>                                 .cra_name = "md5",
>                                 .cra_driver_name = "md5-sun4i-ss",
> @@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
>                 .import = sun4i_hash_import_sha1,
>                 .halg = {
>                         .digestsize = SHA1_DIGEST_SIZE,
> +                       .statesize = sizeof(struct sha1_state),
>                         .base = {
>                                 .cra_name = "sha1",
>                                 .cra_driver_name = "sha1-sun4i-ss",
> --
> 2.4.10
>

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-05 10:34   ` Chen-Yu Tsai
  0 siblings, 0 replies; 34+ messages in thread
From: Chen-Yu Tsai @ 2015-11-05 10:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 5, 2015 at 3:48 PM, LABBE Corentin
<clabbe.montjoie@gmail.com> wrote:
> sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
> A recent change make impossible to load them without giving statesize.
> This patch specifiy statesize for sha1 and md5.
>
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> Cc: stable at vger.kernel.org

Confirmed the driver properly loads again.

Tested-by: Chen-Yu Tsai <wens@csie.org>

> ---
>  drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
> index eab6fe2..107cd2a 100644
> --- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
> +++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
> @@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
>                 .import = sun4i_hash_import_md5,
>                 .halg = {
>                         .digestsize = MD5_DIGEST_SIZE,
> +                       .statesize = sizeof(struct md5_state),
>                         .base = {
>                                 .cra_name = "md5",
>                                 .cra_driver_name = "md5-sun4i-ss",
> @@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
>                 .import = sun4i_hash_import_sha1,
>                 .halg = {
>                         .digestsize = SHA1_DIGEST_SIZE,
> +                       .statesize = sizeof(struct sha1_state),
>                         .base = {
>                                 .cra_name = "sha1",
>                                 .cra_driver_name = "sha1-sun4i-ss",
> --
> 2.4.10
>

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-05  7:48 ` LABBE Corentin
  0 siblings, 0 replies; 34+ messages in thread
From: LABBE Corentin @ 2015-11-05  7:48 UTC (permalink / raw)
  To: herbert, davem, maxime.ripard, wens
  Cc: linux-crypto, linux-arm-kernel, linux-kernel, linux-sunxi,
	LABBE Corentin, stable

sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
A recent change make impossible to load them without giving statesize.
This patch specifiy statesize for sha1 and md5.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Cc: stable@vger.kernel.org
---
 drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
index eab6fe2..107cd2a 100644
--- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
@@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_md5,
 		.halg = {
 			.digestsize = MD5_DIGEST_SIZE,
+			.statesize = sizeof(struct md5_state),
 			.base = {
 				.cra_name = "md5",
 				.cra_driver_name = "md5-sun4i-ss",
@@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_sha1,
 		.halg = {
 			.digestsize = SHA1_DIGEST_SIZE,
+			.statesize = sizeof(struct sha1_state),
 			.base = {
 				.cra_name = "sha1",
 				.cra_driver_name = "sha1-sun4i-ss",
-- 
2.4.10

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-11-05  7:48 ` LABBE Corentin
  0 siblings, 0 replies; 34+ messages in thread
From: LABBE Corentin @ 2015-11-05  7:48 UTC (permalink / raw)
  To: linux-arm-kernel

sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
A recent change make impossible to load them without giving statesize.
This patch specifiy statesize for sha1 and md5.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Cc: stable at vger.kernel.org
---
 drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
index eab6fe2..107cd2a 100644
--- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
@@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_md5,
 		.halg = {
 			.digestsize = MD5_DIGEST_SIZE,
+			.statesize = sizeof(struct md5_state),
 			.base = {
 				.cra_name = "md5",
 				.cra_driver_name = "md5-sun4i-ss",
@@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_sha1,
 		.halg = {
 			.digestsize = SHA1_DIGEST_SIZE,
+			.statesize = sizeof(struct sha1_state),
 			.base = {
 				.cra_name = "sha1",
 				.cra_driver_name = "sha1-sun4i-ss",
-- 
2.4.10

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-10-20 18:05 ` LABBE Corentin
  0 siblings, 0 replies; 34+ messages in thread
From: LABBE Corentin @ 2015-10-20 18:05 UTC (permalink / raw)
  To: clabbe.montjoie, davem, herbert, linux-arm-kernel, maxime.ripard
  Cc: linux-crypto, linux-kernel

sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
A recent change make impossible to load them without giving statesize.
This patch specifiy statesize for sha1 and md5.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
index eab6fe2..107cd2a 100644
--- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
@@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_md5,
 		.halg = {
 			.digestsize = MD5_DIGEST_SIZE,
+			.statesize = sizeof(struct md5_state),
 			.base = {
 				.cra_name = "md5",
 				.cra_driver_name = "md5-sun4i-ss",
@@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_sha1,
 		.halg = {
 			.digestsize = SHA1_DIGEST_SIZE,
+			.statesize = sizeof(struct sha1_state),
 			.base = {
 				.cra_name = "sha1",
 				.cra_driver_name = "sha1-sun4i-ss",
-- 
2.4.10

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

* [PATCH] crypto: sun4i-ss: add missing statesize
@ 2015-10-20 18:05 ` LABBE Corentin
  0 siblings, 0 replies; 34+ messages in thread
From: LABBE Corentin @ 2015-10-20 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
A recent change make impossible to load them without giving statesize.
This patch specifiy statesize for sha1 and md5.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
index eab6fe2..107cd2a 100644
--- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
@@ -39,6 +39,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_md5,
 		.halg = {
 			.digestsize = MD5_DIGEST_SIZE,
+			.statesize = sizeof(struct md5_state),
 			.base = {
 				.cra_name = "md5",
 				.cra_driver_name = "md5-sun4i-ss",
@@ -66,6 +67,7 @@ static struct sun4i_ss_alg_template ss_algs[] = {
 		.import = sun4i_hash_import_sha1,
 		.halg = {
 			.digestsize = SHA1_DIGEST_SIZE,
+			.statesize = sizeof(struct sha1_state),
 			.base = {
 				.cra_name = "sha1",
 				.cra_driver_name = "sha1-sun4i-ss",
-- 
2.4.10

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

end of thread, other threads:[~2015-11-17 21:51 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1447054026-4243-1-git-send-email-clabbe.montjoie@gmail.com>
2015-11-09  7:38 ` [PATCH] crypto: sun4i-ss: add missing statesize Herbert Xu
2015-11-09  7:38   ` Herbert Xu
2015-11-13 13:10 LABBE Corentin
2015-11-13 13:10 ` LABBE Corentin
2015-11-17 14:09 ` Herbert Xu
2015-11-17 14:09   ` Herbert Xu
2015-11-17 14:26   ` LABBE Corentin
2015-11-17 14:26     ` LABBE Corentin
2015-11-17 14:27     ` Herbert Xu
2015-11-17 14:27       ` Herbert Xu
2015-11-17 21:51       ` Greg KH
2015-11-17 21:51         ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2015-11-05  7:48 LABBE Corentin
2015-11-05  7:48 ` LABBE Corentin
2015-11-05 10:34 ` Chen-Yu Tsai
2015-11-05 10:34   ` Chen-Yu Tsai
     [not found] ` <1446709737-11316-1-git-send-email-clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-11-05 16:07   ` Maxime Ripard
2015-11-05 16:07     ` Maxime Ripard
2015-11-05 16:07     ` Maxime Ripard
2015-11-06  4:56     ` Herbert Xu
2015-11-06  4:56       ` Herbert Xu
2015-11-06  4:56       ` Herbert Xu
     [not found]       ` <20151106045639.GA14722-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2015-11-08 17:50         ` Maxime Ripard
2015-11-08 17:50           ` Maxime Ripard
2015-11-08 17:50           ` Maxime Ripard
2015-11-08 18:22           ` Christoph Biedl
2015-11-08 18:22             ` Christoph Biedl
2015-11-09  3:58             ` Herbert Xu
2015-11-09  3:58               ` Herbert Xu
     [not found]               ` <20151109035848.GA2163-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2015-11-11 22:22                 ` Maxime Ripard
2015-11-11 22:22                   ` Maxime Ripard
2015-11-11 22:22                   ` Maxime Ripard
2015-10-20 18:05 LABBE Corentin
2015-10-20 18:05 ` LABBE Corentin

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.