lkml.org 
[lkml]   [2016]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/4] crypto x86/sha1_mb: Fix load failure
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

\
 
 \ /
  Last update: 2016-02-01 09:41    [W:1.081 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site