On Fri, Oct 18, 2019 at 4:42 PM Jörn Engel <jo...@purestorage.com> wrote: > > Sorry for coming late to the discussion. I generally like the approach > in try_to_generate_entropy(), but I think we can do a little better > still. Would something like this work?
Hmm. I'm not convinced that the register set is all that random in general if you have attackers (or - in the absence of an attack - if it hits in the idle loop a lot), but I do like it for this particular use where we have that timeout while doing entropy work. So I think this is potentially a good way to at least improve on the situation when there is no TSC. Which would remove one worry about getrandom() on other platforms than the usual development ones. I'm on a plane at 38,933 ft right now according to the flight tracker, and about to lose internet access again, but I like it and will take another look when I'm on the ground and at a hotel. Linus