From: Marcelo Cerri <marcelo.cerri@canonical.com>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH 1/2] crypto: vmx - Use skcipher for cbc fallback
Date: Wed, 22 Feb 2017 19:17:00 -0300 [thread overview]
Message-ID: <20170222221700.GA19026@gallifrey> (raw)
In-Reply-To: <20170222191819.GB20626@gallifrey>
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]
Hi Hebert,
On Wed, Feb 22, 2017 at 04:18:19PM -0300, Marcelo Cerri wrote:
> Hi Paulo.
>
> On Wed, Feb 22, 2017 at 03:00:15PM -0300, Paulo Flabiano Smorigo wrote:
> >
> > if (in_interrupt()) {
> > - ret = crypto_blkcipher_encrypt(&fallback_desc, dst, src,
> > - nbytes);
> > + SKCIPHER_REQUEST_ON_STACK(req, ctx->fallback);
> > + skcipher_request_set_tfm(req, ctx->fallback);
> > + skcipher_request_set_callback(req, desc->flags, NULL, NULL);
> > + skcipher_request_set_crypt(req, src, dst, nbytes, desc->info);
> > + ret = crypto_skcipher_encrypt(req);
> > + skcipher_request_zero(req);
>
> Probably you have to wait for the completion here before proceeding.
>
> Check Documentation/crypto/api-samples.rst
>
I noticed you used a similar approach in arch/s390/crypto/aes_s390.c
(commit 64e2680).
How do you ensure the skcipher operation will not be asynchronous?
--
Regards,
Marcelo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2017-02-22 22:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 18:00 [PATCH 1/2] crypto: vmx - Use skcipher for cbc fallback Paulo Flabiano Smorigo
2017-02-22 18:00 ` Paulo Flabiano Smorigo
2017-02-22 19:18 ` Marcelo Cerri
2017-02-22 19:18 ` Marcelo Cerri
2017-02-22 22:17 ` Marcelo Cerri [this message]
2017-02-23 11:21 ` Herbert Xu
2017-02-23 13:42 ` Marcelo Cerri
2017-02-25 14:42 ` Herbert Xu
2017-02-23 11:20 ` Herbert Xu
2017-02-24 14:23 ` [PATCH v2 " Paulo Flabiano Smorigo
2017-02-24 14:23 ` Paulo Flabiano Smorigo
2017-02-26 19:21 ` Marcelo Cerri
2017-03-01 13:58 ` [PATCH v3 " Paulo Flabiano Smorigo
2017-03-02 11:07 ` Herbert Xu
2017-03-02 11:07 ` 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=20170222221700.GA19026@gallifrey \
--to=marcelo.cerri@canonical.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.