lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 May 2015 14:57:14 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Stephan Mueller <smueller@...onox.de>
Cc:	pebolle@...cali.nl, andreas.steffen@...ongswan.org, tytso@....edu,
	sandyinchina@...il.com, linux-kernel@...r.kernel.org,
	linux-crypto@...r.kernel.org
Subject: Re: [PATCH v5 1/5] random: Async and sync API for accessing
 nonblocking_pool

On Fri, May 08, 2015 at 08:41:30AM +0200, Stephan Mueller wrote:
> The added API calls provide a synchronous function call
> get_blocking_random_bytes where the caller is blocked until
> the nonblocking_pool is initialized.
> 
> In addition, an asynchronous API call of get_blocking_random_bytes_cb
> is provided which returns immediately to the caller after submitting
> the request for random data. The caller-provided buffer that shall be
> filled with random data is filled up as available entropy permits. The
> caller may provide a callback function that is invoked once the
> request is completed.
> 
> A third API call, get_blocking_random_bytes_cancel, is provided to
> cancel the random number gathering operation.

There are two problems with this patch:

1) The interface is way too complicated for a once off wait used
only during boot.  Really there is no need for cancellations.

2) There is potential for deadlock because you schedule a work that
then sits around until the entropy is available.  What if whatever
is generating that entropy used the same work thread in future?

So I suggest instead an interface that simply schedules a work
when the entropy is available.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ