Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: Stephan Mueller <smueller@chronox.de>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	linux-crypto@vger.kernel.org
Subject: Re: mxs-dcp: Failed to register sha1 hash
Date: Thu, 26 Nov 2015 16:39:36 +0100	[thread overview]
Message-ID: <201511261639.36548.marex@denx.de> (raw)
In-Reply-To: <CAOMZO5Dftr5-dRL_4_xMffc-Zd_r1gqZ0EX0Y8GKCWYg0gn6Ww@mail.gmail.com>

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@chronox.de> 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

      reply	other threads:[~2015-11-26 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 15:14 mxs-dcp: Failed to register sha1 hash Fabio Estevam
2015-11-26 15:25 ` Stephan Mueller
2015-11-26 15:38   ` Fabio Estevam
2015-11-26 15:39     ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201511261639.36548.marex@denx.de \
    --to=marex@denx.de \
    --cc=festevam@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=smueller@chronox.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox