Re: [PATCH v5 04/11] mips: use fallback for random_get_entropy() instead of just c0 random

2022-04-21 Thread Thomas Bogendoerfer
On Tue, Apr 19, 2022 at 01:16:43PM +0200, Jason A. Donenfeld wrote: > For situations in which we don't have a c0 counter register available, > we've been falling back to reading the c0 "random" register, which is > usually bounded by the amount of TLB entries and changes every other > cycle or so.

Re: [PATCH v5 04/11] mips: use fallback for random_get_entropy() instead of just c0 random

2022-04-21 Thread Jason A. Donenfeld
Hi Maciej, On Thu, Apr 21, 2022 at 9:25 PM Maciej W. Rozycki wrote: > > On Tue, 19 Apr 2022, Jason A. Donenfeld wrote: > > > For situations in which we don't have a c0 counter register available, > > we've been falling back to reading the c0 "random" register, which is > > usually bounded by the

Re: [PATCH v5 04/11] mips: use fallback for random_get_entropy() instead of just c0 random

2022-04-21 Thread Maciej W. Rozycki
On Tue, 19 Apr 2022, Jason A. Donenfeld wrote: > For situations in which we don't have a c0 counter register available, > we've been falling back to reading the c0 "random" register, which is > usually bounded by the amount of TLB entries and changes every other > cycle or so. This means it wraps

Re: [PATCH v5 10/11] xtensa: use fallback for random_get_entropy() instead of zero

2022-04-21 Thread Max Filippov
On Tue, Apr 19, 2022 at 4:18 AM Jason A. Donenfeld wrote: > > In the event that random_get_entropy() can't access a cycle counter or > similar, falling back to returning 0 is really not the best we can do. > Instead, at least calling random_get_entropy_fallback() would be > preferable, because tha