Re: mxs-dcp: Failed to register sha1 hash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, November 26, 2015 at 04:38:01 PM, Fabio Estevam wrote:
> Hi Stephan,
> 
> On Thu, Nov 26, 2015 at 1:25 PM, Stephan Mueller <smueller@xxxxxxxxxx> wrote:
> > Briefly looking into drivers/crypto/mxs-dcp.c, it is an ahash and does
> > not contain halg.statesize in the algo definitions. Thus it looks very
> > much like the same issue that I see with ghash.
> 
> Thanks for your suggestion!
> 
> You are right: this makes the error goes away:
> 
> --- a/drivers/crypto/mxs-dcp.c
> +++ b/drivers/crypto/mxs-dcp.c
> @@ -836,6 +836,7 @@ static struct ahash_alg dcp_sha1_alg = {
>         .digest = dcp_sha_digest,
>         .halg   = {
>                 .digestsize     = SHA1_DIGEST_SIZE,
> +               .statesize      = sizeof(struct sha1_state),
>                 .base           = {
>                         .cra_name               = "sha1",
>                         .cra_driver_name        = "sha1-dcp",
> @@ -860,6 +861,7 @@ static struct ahash_alg dcp_sha256_alg = {
>         .digest = dcp_sha_digest,
>         .halg   = {
>                 .digestsize     = SHA256_DIGEST_SIZE,
> +               .statesize      = sizeof(struct sha256_state),
>                 .base           = {
>                         .cra_name               = "sha256",
>                         .cra_driver_name        = "sha256-dcp",
> 
> 
> Will submit it as a formal patch.

Excellent, thank you!

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux