From: Herbert Xu <herbert@gondor.apana.org.au>
To: Rui Wang <rui.y.wang@intel.com>
Cc: tim.c.chen@linux.intel.com, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] crypto x86/sha1_mb: Fix load failure
Date: Mon, 1 Feb 2016 16:17:51 +0800 [thread overview]
Message-ID: <20160201081751.GC5818@gondor.apana.org.au> (raw)
In-Reply-To: <1453885718-24599-2-git-send-email-rui.y.wang@intel.com>
On Wed, Jan 27, 2016 at 05:08:35PM +0800, Rui Wang wrote:
>
> +static int sha1_mb_async_import(struct ahash_request *req, const void *in)
> +{
> + struct ahash_request *mcryptd_req = ahash_request_ctx(req);
> + struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
> + struct sha1_mb_ctx *ctx = crypto_ahash_ctx(tfm);
> + struct mcryptd_ahash *mcryptd_tfm = ctx->mcryptd_tfm;
> + struct crypto_shash *child = mcryptd_ahash_child(mcryptd_tfm);
> + struct mcryptd_hash_request_ctx *rctx;
> + struct shash_desc *desc;
> + int err;
> +
> + memcpy(mcryptd_req, req, sizeof(*req));
> + ahash_request_set_tfm(mcryptd_req, &mcryptd_tfm->base);
> + rctx = ahash_request_ctx(mcryptd_req);
> + desc = &rctx->desc;
> + desc->tfm = child;
> + desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP;
> +
> + err = crypto_shash_init(desc);
> + if (err)
> + return err;
What is this desc for?
> + return crypto_ahash_import(mcryptd_req, in);
> +}
Cheers,
--
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-02-01 8:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 9:08 [PATCH v2 0/4] Fix sha1_mb failure and testing import()/export() Rui Wang
2016-01-27 9:08 ` [PATCH v2 1/4] crypto x86/sha1_mb: Fix load failure Rui Wang
2016-02-01 8:17 ` Herbert Xu [this message]
2016-01-27 9:08 ` [PATCH v2 2/4] crypto: mcryptd - " Rui Wang
2016-02-01 8:16 ` Herbert Xu
2016-01-27 9:08 ` [PATCH v2 3/4] crypto: algif_hash - wait for crypto_ahash_init() to complete Rui Wang
2016-02-01 8:17 ` Herbert Xu
2016-01-27 9:08 ` [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export() Rui Wang
2016-02-01 8:21 ` Herbert Xu
2016-02-02 13:56 [PATCH v2 1/4] crypto x86/sha1_mb: Fix load failure Rui Wang
2016-02-06 7:47 ` Herbert Xu
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=20160201081751.GC5818@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rui.y.wang@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
all inboxes | Powered by JetHome®