2015-11-13 13:10:42

by Corentin Labbe

[permalink] [raw]
Subject: [PATCH] crypto: sun4i-ss: add missing statesize

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: <[email protected]> # v4.3+
Tested-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: LABBE Corentin <[email protected]>
---
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


2015-11-17 14:09:58

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: sun4i-ss: add missing statesize

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: <[email protected]> # v4.3+
> Tested-by: Chen-Yu Tsai <[email protected]>
> Signed-off-by: LABBE Corentin <[email protected]>

Patch applied to cryptodev as I don't think it needs to go into
stable straight away. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2015-11-17 14:26:11

by Corentin Labbe

[permalink] [raw]
Subject: Re: [PATCH] crypto: sun4i-ss: add missing statesize

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: <[email protected]> # v4.3+
> > Tested-by: Chen-Yu Tsai <[email protected]>
> > Signed-off-by: LABBE Corentin <[email protected]>
>
> 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

2015-11-17 14:28:00

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: sun4i-ss: add missing statesize

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 <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2015-11-17 21:51:15

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] crypto: sun4i-ss: add missing statesize

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