lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <C440BA31B54DCD4AAC682D2365C8FEE703C52D94@ORSMSX111.amr.corp.intel.com>
Date:	Fri, 3 Jun 2016 02:51:14 +0000
From:	"Dey, Megha" <megha.dey@...el.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
CC:	"tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Yu, Fenghua" <fenghua.yu@...el.com>
Subject: RE: [PATCH 2/2] crypto : async implementation for sha1-mb



-----Original Message-----
From: Herbert Xu [mailto:herbert@...dor.apana.org.au] 
Sent: Thursday, June 2, 2016 5:33 PM
To: Dey, Megha <megha.dey@...el.com>
Cc: tim.c.chen@...ux.intel.com; davem@...emloft.net; linux-crypto@...r.kernel.org; linux-kernel@...r.kernel.org; Yu, Fenghua <fenghua.yu@...el.com>
Subject: Re: [PATCH 2/2] crypto : async implementation for sha1-mb

On Thu, Jun 02, 2016 at 10:20:20AM -0700, Megha Dey wrote:
>
> > > @@ -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.
> > 
> Herbert, Could you please clarify?
> In the earlier code we had a async_request which is now replaced by 
> crypto_async_request. Do you want a new async_request to be used?
> Do you think we shouldn't be setting the members of the 
> crypto_ahash_request directly, but use some other interface to do the 
> same for us?

You already have an ahash_request here.  So you should be doing

ahash_request_set_tfm(...)
ahash_request_set_callback(...)

>ok,done!
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ