From: Herbert Xu <herbert@gondor.apana.org.au>
To: Megha Dey <megha.dey@intel.com>
Cc: tim.c.chen@linux.intel.com, davem@davemloft.net,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
fenghua.yu@intel.com, Megha Dey <megha.dey@linux.intel.com>
Subject: Re: [PATCH 2/2] crypto : async implementation for sha1-mb
Date: Thu, 2 Jun 2016 18:33:31 +0800 [thread overview]
Message-ID: <20160602103331.GA16969@gondor.apana.org.au> (raw)
In-Reply-To: <1464730941-8847-3-git-send-email-megha.dey@intel.com>
On Tue, May 31, 2016 at 02:42:21PM -0700, Megha Dey wrote:
>
> @@ -416,8 +421,8 @@ static void mcryptd_hash_finup(struct crypto_async_request *req_async, int err)
>
> if (unlikely(err == -EINPROGRESS))
> goto out;
> -
> - err = shash_ahash_mcryptd_finup(req, &rctx->desc);
> + rctx->out = req->result;
> + err = shash_ahash_mcryptd_finup(req, &rctx->areq);
These shash_ahash functions should be renamed.
Also why are they exported?
> @@ -439,17 +444,18 @@ static int mcryptd_hash_finup_enqueue(struct ahash_request *req)
> static void mcryptd_hash_digest(struct crypto_async_request *req_async, int err)
> {
> struct mcryptd_hash_ctx *ctx = crypto_tfm_ctx(req_async->tfm);
> - struct crypto_shash *child = ctx->child;
> + struct crypto_ahash *child = ctx->child;
> struct ahash_request *req = ahash_request_cast(req_async);
> struct mcryptd_hash_request_ctx *rctx = ahash_request_ctx(req);
> - struct shash_desc *desc = &rctx->desc;
> + struct ahash_request *desc = &rctx->areq;
> + struct crypto_async_request *base = &desc->base;
>
> if (unlikely(err == -EINPROGRESS))
> goto out;
> + base->tfm = &child->base;
> + base->flags = CRYPTO_TFM_REQ_MAY_SLEEP; /* check this again */
You should not be touching crypto_async_request directly. Use
the proper ahash interface to set the child request.
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
next prev parent reply other threads:[~2016-06-02 10:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 21:42 [PATCH 0/2] async implementation for sha1-mb Megha Dey
2016-05-31 21:42 ` [PATCH 1/2] crypto : stylistic cleanup in sha1-mb Megha Dey
2016-06-02 10:45 ` Herbert Xu
2016-05-31 21:42 ` [PATCH 2/2] crypto : async implementation for sha1-mb Megha Dey
2016-06-02 10:33 ` Herbert Xu [this message]
2016-06-02 17:20 ` Megha Dey
2016-06-03 0:33 ` Herbert Xu
2016-06-03 2:51 ` Dey, Megha
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=20160602103331.GA16969@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=fenghua.yu@intel.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=megha.dey@intel.com \
--cc=megha.dey@linux.intel.com \
--cc=tim.c.chen@linux.intel.com \
/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