From: Stephan Mueller <smueller@chronox.de>
To: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: af_alg - add async support to algif_aead
Date: Thu, 28 Jan 2016 18:09:55 +0100 [thread overview]
Message-ID: <3065480.xA9mO0V5SY@tauon.atsec.com> (raw)
In-Reply-To: <56AA3B19.8080604@intel.com>
Am Donnerstag, 28. Januar 2016, 08:00:25 schrieb Tadeusz Struk:
Hi Tadeusz,
>Hi Stephan,
>
>On 01/27/2016 10:26 PM, Stephan Mueller wrote:
>>> + for (i = 0; i < areq->tsgls; i++)
>>>
>>> > + put_page(sg_page(sg + i));
>>
>> Shouldn't here be the same logic as in put_sgl? I.e.
>>
>> for (i = 0; i < sgl->cur; i++) {
>>
>> if (!sg_page(sg + i))
>>
>> continue;
>>
>> put_page(sg_page(sg + i));
>> sg_assign_page(sg + i, NULL);
>>
>> }
>
>Thanks for reviewing.
>I don't think it is possible that there ever will be any gaps in the tsgl.
>In fact if there is such a possibility then it is a serious problem, because
>it would mean that we are sending NULL ptrs to the ciphers (see line 640):
>
> sg_mark_end(sgl->sg + sgl->cur - 1);
> aead_request_set_crypt(&ctx->aead_req, sgl->sg, ctx-
>first_rsgl.sgl.sg,
> used, ctx->iv);
>
>I don't see any implementation checking for null in sgls. Most of them just
>do:
>
> for_each_sg(sgl, sg, nents, i)
> sg_virt(sg)...
>
>So it would Oops there. I think this check in put_sgl is redundant.
>Thanks,
algif_skcipher does a similar check in skcipher_pull_sgl:
...
if (!sg_page(sg + i))
continue;
...
if (put)
put_page(sg_page(sg + i));
sg_assign_page(sg + i, NULL);
...
Ciao
Stephan
next prev parent reply other threads:[~2016-01-28 17:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 22:10 Tadeusz Struk
2016-01-27 22:29 ` kbuild test robot
2016-01-27 22:41 ` Tadeusz Struk
2016-01-28 8:48 ` [kbuild-all] " Fengguang Wu
2016-01-28 6:26 ` Stephan Mueller
2016-01-28 16:00 ` Tadeusz Struk
2016-01-28 17:09 ` Stephan Mueller [this message]
2016-01-28 17:30 ` Tadeusz Struk
-- strict thread matches above, loose matches on Subject: below --
2016-01-15 19:21 Tadeusz Struk
2016-01-17 15:07 ` Stephan Mueller
2016-01-18 15:22 ` Tadeusz Struk
2016-01-19 0:34 ` Herbert Xu
2016-01-19 15:18 ` Tadeusz Struk
2016-01-20 20:18 ` Tadeusz Struk
2016-01-21 5:00 ` 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=3065480.xA9mO0V5SY@tauon.atsec.com \
--to=smueller@chronox.de \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tadeusz.struk@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
Powered by JetHome