Re: [PATCH v3 0/8] Rework random blocking

Matthew Garrett
2019-12-26T10:21:36Z

On Thu, Dec 26, 2019 at 10:29:00AM +0100, Stephan Müller wrote:
>
> What about offering a compile-time option to enable or disable such code?
> Note, with the existing random.c code base, there is no need to have a
> separate blocking_pool. The ChaCha20 DRNG could be used for that very same
> purpose, provided that in case these true random numbers are generated when
> the Chacha20 DRNG received an equal amount of "unused" entropy.

I think it's reasonable to offer such an option as long as it's made
clear that it'll break userland and should only be enabled under very
weird circumstances. We don't want to end up in a situation where
userland developers feel that they need to code to handle such
situations - the only people who care about this distinction should be
in control of their userland stack and able to cope with the
consequences.

> If an unprivileged caller requests true random data, at least 1024 bits of
> entropy is left in the pool. I.e. all entropy above that point is available
> for this request type. Note, even namespaces fall into this category
> considering that unprivileged users can create a user name space in which they
> can become root.

I also feel like describing any of this as "true random data" is
misleading. Most of our entropy sources are devices that could, given
sufficient information, be modelled accurately. We're not sampling
quantum events here.

--
Matthew Garrett | mjg59@srcf.ucam.org