Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1420587 > unrolled thread
| Started by | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| First post | 2016-06-13 10:30 +0200 |
| Last post | 2016-06-14 06:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] crypto : async implementation for sha1-mb Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-13 10:30 +0200
RE: [PATCH] crypto : async implementation for sha1-mb "Dey, Megha" <megha.dey@intel.com> - 2016-06-13 21:20 +0200
Re: [PATCH] crypto : async implementation for sha1-mb Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-14 06:40 +0200
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2016-06-13 10:30 +0200 |
| Subject | Re: [PATCH] crypto : async implementation for sha1-mb |
| Message-ID | <rJvpU-3Ie-21@gated-at.bofh.it> |
On Tue, Jun 07, 2016 at 11:14:42AM -0700, Megha Dey wrote: > > - desc->tfm = child; > - desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; > + ahash_request_set_tfm(desc, child); > + ahash_request_set_callback(desc, CRYPTO_TFM_REQ_MAY_SLEEP, NULL, NULL); Why are the callbacks set to NULL/NULL? The child is async so you should have a valid callback function here. Instead of continuing to do the broken callback handling outside of the API (i.e., rctx->complete) please use the API mechanism that is provided for this purpose. 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
[toc] | [next] | [standalone]
| From | "Dey, Megha" <megha.dey@intel.com> |
|---|---|
| Date | 2016-06-13 21:20 +0200 |
| Message-ID | <rJFyW-26n-45@gated-at.bofh.it> |
| In reply to | #1420587 |
-----Original Message----- From: Herbert Xu [mailto:herbert@gondor.apana.org.au] Sent: Monday, June 13, 2016 1:22 AM To: Dey, Megha <megha.dey@intel.com> Cc: tim.c.chen@linux.intel.com; davem@davemloft.net; linux-crypto@vger.kernel.org; linux-kernel@vger.kernel.org; Yu, Fenghua <fenghua.yu@intel.com>; Megha Dey <megha.dey@linux.intel.com> Subject: Re: [PATCH] crypto : async implementation for sha1-mb On Tue, Jun 07, 2016 at 11:14:42AM -0700, Megha Dey wrote: > > - desc->tfm = child; > - desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; > + ahash_request_set_tfm(desc, child); > + ahash_request_set_callback(desc, CRYPTO_TFM_REQ_MAY_SLEEP, NULL, > +NULL); Why are the callbacks set to NULL/NULL? The child is async so you should have a valid callback function here. Instead of continuing to do the broken callback handling outside of the API (i.e., rctx->complete) please use the API mechanism that is provided for this purpose. > In the current implementation, the inner algorithm is called directly, and we use the outer algorithm's callback. We do not use the callback in inner algorithm. We are actually calling the child functions directly and the child is using the parent's call back function. Probably I can add a comment before the set callback function.. will this be ok? 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
[toc] | [prev] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2016-06-14 06:40 +0200 |
| Message-ID | <rJOiR-8dt-13@gated-at.bofh.it> |
| In reply to | #1421233 |
On Mon, Jun 13, 2016 at 07:10:26PM +0000, Dey, Megha wrote: > > > In the current implementation, the inner algorithm is called directly, and we use the outer algorithm's callback. We do not use the callback in inner algorithm. We are actually calling the child functions directly and the child is using the parent's call back function. Probably I can add a comment before the set callback function.. will this be ok? No this is a hack and you should not do that. You can of course set the inner request's callback to that of the outer request. 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web