From: Eric Biggers <ebiggers3@gmail.com>
To: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Jonathan Corbet <corbet@lwn.net>,
David Howells <dhowells@redhat.com>,
Ofir Drang <ofir.drang@arm.com>,
Gilad Ben-Yossef <gilad.benyossef@arm.com>,
linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, keyrings@vger.kernel.org
Subject: Re: [PATCH 4/4] crypto: Documentation: fix none signal safe sample
Date: Tue, 16 May 2017 22:41:07 +0000 [thread overview]
Message-ID: <20170516224107.GD113464@gmail.com> (raw)
In-Reply-To: <1494503626-15877-5-git-send-email-gilad@benyossef.com>
On Thu, May 11, 2017 at 02:53:45PM +0300, Gilad Ben-Yossef wrote:
> The sample code was showing use of wait_for_completion_interruptible()
> for waiting for an async. crypto op to finish. However, if a signal
> arrived it would free the buffers used even while crypto HW might
> still DMA from/into the buffers.
>
> Resolve this by using wait_for_completion() instead.
>
> Reported-by: Eric Biggers <ebiggers3@gmail.com>
> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
> ---
> Documentation/crypto/api-samples.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/crypto/api-samples.rst b/Documentation/crypto/api-samples.rst
> index d021fd9..944f08b 100644
> --- a/Documentation/crypto/api-samples.rst
> +++ b/Documentation/crypto/api-samples.rst
> @@ -48,7 +48,7 @@ Code Example For Symmetric Key Cipher Operation
> break;
> case -EINPROGRESS:
> case -EBUSY:
> - rc = wait_for_completion_interruptible(
> + rc = wait_for_completion(
> &sk->result.completion);
> if (!rc && !sk->result.err) {
> reinit_completion(&sk->result.completion);
> --
> 2.1.4
>
Same issue here: wait_for_completion() doesn't return a value.
Eric
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers3@gmail.com>
To: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Jonathan Corbet <corbet@lwn.net>,
David Howells <dhowells@redhat.com>,
Ofir Drang <ofir.drang@arm.com>,
Gilad Ben-Yossef <gilad.benyossef@arm.com>,
linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, keyrings@vger.kernel.org
Subject: Re: [PATCH 4/4] crypto: Documentation: fix none signal safe sample
Date: Tue, 16 May 2017 15:41:07 -0700 [thread overview]
Message-ID: <20170516224107.GD113464@gmail.com> (raw)
In-Reply-To: <1494503626-15877-5-git-send-email-gilad@benyossef.com>
On Thu, May 11, 2017 at 02:53:45PM +0300, Gilad Ben-Yossef wrote:
> The sample code was showing use of wait_for_completion_interruptible()
> for waiting for an async. crypto op to finish. However, if a signal
> arrived it would free the buffers used even while crypto HW might
> still DMA from/into the buffers.
>
> Resolve this by using wait_for_completion() instead.
>
> Reported-by: Eric Biggers <ebiggers3@gmail.com>
> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
> ---
> Documentation/crypto/api-samples.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/crypto/api-samples.rst b/Documentation/crypto/api-samples.rst
> index d021fd9..944f08b 100644
> --- a/Documentation/crypto/api-samples.rst
> +++ b/Documentation/crypto/api-samples.rst
> @@ -48,7 +48,7 @@ Code Example For Symmetric Key Cipher Operation
> break;
> case -EINPROGRESS:
> case -EBUSY:
> - rc = wait_for_completion_interruptible(
> + rc = wait_for_completion(
> &sk->result.completion);
> if (!rc && !sk->result.err) {
> reinit_completion(&sk->result.completion);
> --
> 2.1.4
>
Same issue here: wait_for_completion() doesn't return a value.
Eric
next prev parent reply other threads:[~2017-05-16 22:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 11:53 [PATCH 0/4] crypto: async crypto op fixes Gilad Ben-Yossef
2017-05-11 11:53 ` [PATCH 1/4] crypto: handle EBUSY due to backlog correctly Gilad Ben-Yossef
2017-05-11 11:53 ` [PATCH 2/4] crypto: drbg wait for crypto op not signal safe Gilad Ben-Yossef
2017-05-16 22:39 ` Eric Biggers
2017-05-16 22:39 ` Eric Biggers
2017-05-18 5:09 ` Herbert Xu
2017-05-18 5:09 ` Herbert Xu
2017-05-18 9:23 ` Gilad Ben-Yossef
2017-05-18 9:23 ` Gilad Ben-Yossef
2017-05-11 11:53 ` [PATCH 3/4] crypto: gcm " Gilad Ben-Yossef
2017-05-11 11:53 ` [PATCH 4/4] crypto: Documentation: fix none signal safe sample Gilad Ben-Yossef
2017-05-16 22:41 ` Eric Biggers [this message]
2017-05-16 22:41 ` Eric Biggers
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=20170516224107.GD113464@gmail.com \
--to=ebiggers3@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=gilad.benyossef@arm.com \
--cc=gilad@benyossef.com \
--cc=herbert@gondor.apana.org.au \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ofir.drang@arm.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 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.