Messages in this thread |  | | Date | Sun, 29 Apr 2018 20:11:07 -0400 | From | "Theodore Y. Ts'o" <> | Subject | Re: Linux messages full of `random: get_random_u32 called from` |
| |
On Sun, Apr 29, 2018 at 03:49:28PM -0700, Sultan Alsawaf wrote: > On Mon, Apr 30, 2018 at 12:43:48AM +0200, Jason A. Donenfeld wrote: > > > - if ((fast_pool->count < 64) && > > > - !time_after(now, fast_pool->last + HZ)) > > > - return; > > > - > > > > I suspect you still want the rate-limiting in place. But if you _do_ > > want to cheat like this, you could instead just modify the condition > > to only relax the rate limiting when !crng_init(). > > Good idea. Attached a new patch that's less intrusive. It still fixes my issue, > of course.
What your patch does is assume that there is a full bit of uncertainty that can be obtained from the information gathered from each interrupt. I *might* be willing to assume that to be valid on x86 systems that have a high resolution cycle counter. But on ARM platforms, especially during system bootup when the user isn't typing anything and SSD's and flash storage tend to have very predictable timing patterns? Not a bet I'd be willing to take. Even with a cycle counter, there's a reason why we assumed that we need to mix in timing results from 64 interrupts or one second's worth before we would give a single bit's worth of entropy credit.
- Ted
|  |