mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Megha Dey <megha.dey@linux.intel.com>
Cc: tim.c.chen@linux.intel.com, davem@davemloft.net,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	megha.dey@intel.com
Subject: Re: [PATCH V7 5/7] crypto: AES CBC multi-buffer glue code
Date: Thu, 3 Aug 2017 13:27:33 +0800	[thread overview]
Message-ID: <20170803052733.GA11871@gondor.apana.org.au> (raw)
In-Reply-To: <1501035000-6283-6-git-send-email-megha.dey@linux.intel.com>

On Tue, Jul 25, 2017 at 07:09:58PM -0700, Megha Dey wrote:
>
> +/* notify the caller of progress ; request still stays in queue */
> +
> +static void notify_callback(struct mcryptd_skcipher_request_ctx *rctx,
> +			    struct mcryptd_alg_cstate *cstate,
> +			    int err)
> +{
> +	struct skcipher_request *req = cast_mcryptd_ctx_to_req(rctx);
> +
> +	local_bh_disable();
> +	rctx->complete(&req->base, err);
> +	local_bh_enable();
> +}

Please explain why you have this crazy construct that does async
operations behind the crypto API's back while pretending to be sync
by always returning zero?

Why is this even needed now that you have switched the underlying
implementation to be async?

> +	/* from mcryptd, we need to callback */
> +	if (irqs_disabled())
> +		rctx->complete(&req->base, err);
> +	else {
> +		local_bh_disable();
> +		rctx->complete(&req->base, err);
> +		local_bh_enable();
> +	}

I complained about this the first time around and yet this crap is
still there.

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

  reply	other threads:[~2017-08-03  5:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26  2:09 [PATCH V7 0/7] crypto: AES CBC multibuffer implementation Megha Dey
2017-07-26  2:09 ` [PATCH V7 1/7] crypto: Multi-buffer encryption infrastructure support Megha Dey
2017-07-26  2:09 ` [PATCH V7 2/7] crypto: AES CBC multi-buffer data structures Megha Dey
2017-07-26  2:09 ` [PATCH V7 3/7] crypto: AES CBC multi-buffer scheduler Megha Dey
2017-07-26  2:09 ` [PATCH V7 4/7] crypto: AES CBC by8 encryption Megha Dey
2017-07-26  2:09 ` [PATCH V7 5/7] crypto: AES CBC multi-buffer glue code Megha Dey
2017-08-03  5:27   ` Herbert Xu [this message]
2018-01-09 21:07     ` Megha Dey
2017-07-26  2:09 ` [PATCH V7 6/7] crypto: AES vectors for AES CBC multibuffer testing Megha Dey
2017-07-26  2:10 ` [PATCH V7 7/7] crypto: AES CBC multi-buffer tcrypt Megha Dey
2017-07-31 22:47 ` [PATCH V7 0/7] crypto: AES CBC multibuffer implementation Megha Dey

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=20170803052733.GA11871@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --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

all inboxes | Powered by JetHome®