Re: Linux 5.3-rc8

From: Matthew Garrett
Date: Tue Sep 17 2019 - 17:52:26 EST


On Tue, Sep 17, 2019 at 11:38:33PM +0200, Martin Steigerwald wrote:

> My understanding of entropy always has been that only a certain amount
> of it can be produced in a certain amount of time. If that is wrongâ
> please by all means, please teach me, how it would be.

getrandom() will never "consume entropy" in a way that will block any
users of getrandom(). If you don't have enough collected entropy to seed
the rng, getrandom() will block. If you do, getrandom() will generate as
many numbers as you ask it to, even if no more entropy is ever collected
by the system. So it doesn't matter how many clients you have calling
getrandom() in the boot process - either there'll be enough entropy
available to satisfy all of them, or there'll be too little to satisfy
any of them.

--
Matthew Garrett | mjg59@xxxxxxxxxxxxx