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.stef...@strongswan.org> > CC: Theodore Ts'o <ty...@mit.edu> > CC: Sandy Harris <sandyinch...@gmail.com> > Signed-off-by: Stephan Mueller <smuel...@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 <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html