From: Sabrina Dubroca <sd@queasysnail.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: crypto: ahash - Fix EINPROGRESS notification callback
Date: Mon, 10 Apr 2017 11:21:27 +0200 [thread overview]
Message-ID: <20170410092127.GA24816@bistromath.localdomain> (raw)
In-Reply-To: <20170410084450.GA7533@gondor.apana.org.au>
2017-04-10, 16:44:50 +0800, Herbert Xu wrote:
> The ahash API modifies the request's callback function in order
> to clean up after itself in some corner cases (unaligned final
> and missing finup).
>
> When the request is complete ahash will restore the original
> callback and everything is fine. However, when the request gets
> an EBUSY on a full queue, an EINPROGRESS callback is made while
> the request is still ongoing.
>
> In this case the ahash API will incorrectly call its own callback.
>
> This patch fixes the problem by creating a temporary request
> object on the stack which is used to relay EINPROGRESS back to
> the original completion function.
>
> This patch also adds code to preserve the original flags value.
>
> Cc: <vger@stable.kernel.org>
Should that be stable@vger.kernel.org?
> Reported-by: Sabrina Dubroca <sdubroca@redhat.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
The definition of ahash_request_flags() was missing, so I added:
static inline u32 ahash_request_flags(struct ahash_request *req)
{
return req->base.flags;
}
And with this, my tests seem fine.
Tested-by: Sabrina Dubroca <sd@queasysnail.net>
Could also you change the 'Reported-by:' to that email address?
Thanks,
--
Sabrina
next prev parent reply other threads:[~2017-04-10 9:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 8:44 crypto: ahash - Fix EINPROGRESS notification callback Herbert Xu
2017-04-10 9:21 ` Sabrina Dubroca [this message]
2017-04-10 9:27 ` [PATCH v2] " Herbert Xu
2017-04-10 9:37 ` Sabrina Dubroca
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=20170410092127.GA24816@bistromath.localdomain \
--to=sd@queasysnail.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox