mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stephan Mueller <smueller@chronox.de>
Cc: Ted Tso <tytso@mit.edu>,
	andreas.steffen@strongswan.org, sandyinchina@gmail.com,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: use list to stage async seeding requests
Date: Tue, 9 Jun 2015 14:49:55 +0800	[thread overview]
Message-ID: <20150609064955.GA8794@gondor.apana.org.au> (raw)
In-Reply-To: <1758927.bAziGtcHhF@tachyon.chronox.de>

On Sat, Jun 06, 2015 at 04:16:54AM +0200, Stephan Mueller wrote:
> This patch uses a list to track the asynchronous seeding requests until
> the nonblocking pool is fully initialized. The random.c is provided with
> two API calls: the get_blocking_random_bytes_cb allows the caller to
> provide a callback function that is triggered once the nonblocking pool
> is initialized. If the nonblocking pool is already initialized at the
> time of invocation, the function is a noop. The second API call of
> get_blocking_random_bytes_cancel allows the caller to cancel an
> outstanding request.
> 
> The previous approach used a waitqueue for maintaining the requests
> until the nonblocking pool is initialized. In some circumstances, the
> wait can be very long (in the orders of minutes) where the use of
> waitqueues is not appropriate.
> 
> The patch also removes the entropy buffer registered with the DRBG
> handle in favor of stack variables to hold the seed data.
> 
> CC: Andreas Steffen <andreas.steffen@strongswan.org>
> CC: Theodore Ts'o <tytso@mit.edu>
> CC: Sandy Harris <sandyinchina@gmail.com>
> Signed-off-by: Stephan Mueller <smueller@chronox.de>

This patch still has many issues with repsect to work cancellation.
I've decided to do this myself.  I will post the result once I have
done some testing.

Thanks,
-- 
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:[~2015-06-09  6:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-06  2:16 Stephan Mueller
2015-06-09  6:49 ` Herbert Xu [this message]
2015-06-09 10:18   ` [PATCH 0/3] random: Replace kernel blocking API with callback API Herbert Xu
2015-06-09 10:19     ` [PATCH 1/3] random: Add callback API for random pool readiness Herbert Xu
2015-06-09 10:19     ` [PATCH 2/3] crypto: drbg - Use callback API for random readiness Herbert Xu
2015-06-09 12:23       ` Stephan Mueller
2015-06-09 13:24         ` Herbert Xu
2015-06-09 10:19     ` [PATCH 3/3] random: Remove kernel blocking API Herbert Xu
2015-06-09 10:21     ` [PATCH 2/3] crypto: drbg - Use callback API for random readiness Herbert Xu
2015-06-09 13:55     ` 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=20150609064955.GA8794@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=andreas.steffen@strongswan.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandyinchina@gmail.com \
    --cc=smueller@chronox.de \
    --cc=tytso@mit.edu \
    /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®