From: Tom Lendacky <thomas.lendacky@amd.com>
To: Fabio Estevam <festevam@gmail.com>,
Herbert Xu <herbert@gondor.apana.org.au>
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>,
<linux-crypto@vger.kernel.org>,
Fabio Estevam <fabio.estevam@nxp.com>
Subject: Re: [PATCH] crypto: sahara: Fill the statesize field
Date: Wed, 13 Jan 2016 11:00:51 -0600 [thread overview]
Message-ID: <569682C3.8020408@amd.com> (raw)
In-Reply-To: <CAOMZO5A2eome5yGV_K9+qOwh9ndu=n71f_Vtee0VowVq0rm40g@mail.gmail.com>
On 01/13/2016 10:42 AM, Fabio Estevam wrote:
> On Wed, Jan 13, 2016 at 10:10 AM, Fabio Estevam <festevam@gmail.com> wrote:
>
>> diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
>> index f68c24a..d05d849 100644
>> --- a/drivers/crypto/sahara.c
>> +++ b/drivers/crypto/sahara.c
>> @@ -1260,6 +1260,7 @@ static struct ahash_alg sha_v3_algs[] = {
>> .export = sahara_sha_export,
>> .import = sahara_sha_import,
>> .halg.digestsize = SHA1_DIGEST_SIZE,
>> + .halg.statesize = sizeof(struct sahara_ctx),
>
> Or should this be sizeof(struct sha1_state) instead?
It should actually be the size of the data that your import and export
routines copy. Looking at those it should be sizeof(struct sahara_ctx) +
sizeof(struct sahara_sha_reqctx).
Should the struct sahara_ctx be part of the import and export data,
though?
Tom
>
>> .halg.base = {
>> .cra_name = "sha1",
>> .cra_driver_name = "sahara-sha1",
>> @@ -1287,6 +1288,7 @@ static struct ahash_alg sha_v4_algs[] = {
>> .export = sahara_sha_export,
>> .import = sahara_sha_import,
>> .halg.digestsize = SHA256_DIGEST_SIZE,
>> + .halg.statesize = sizeof(struct sahara_ctx),
>
> Or should this be sizeof(struct sha256_state) instead?
>
> Thanks
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-01-13 17:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 12:10 [PATCH] crypto: sahara: Fill the statesize field Fabio Estevam
2016-01-13 16:42 ` Fabio Estevam
2016-01-13 17:00 ` Tom Lendacky [this message]
2016-01-13 17:24 ` Fabio Estevam
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=569682C3.8020408@amd.com \
--to=thomas.lendacky@amd.com \
--cc=fabio.estevam@nxp.com \
--cc=festevam@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=s.trumtrar@pengutronix.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;
as well as URLs for NNTP newsgroup(s).