Hi Jason, On 05/07/2022 20:19, Jason A. Donenfeld wrote: > Hey Holger, > > On Tue, Jul 05, 2022 at 07:47:37PM +0200, Holger Dengler wrote: >> A trng call runs for minimal ~20-190us for 32 bytes. 20us on newer >> machine generations, 190us on older ones. These are not 100% exact >> measurements, but the dimension should be correct. > > Holy smokes. Yea, okay, I see what you're saying. So indeed it sounds > like the `!in_hardirq()` addition would be a good idea. Let's do that. :) I'll come up with this in v2. For the long run, a re-worked API arch_get_random_seed_something() with an arch-dependant variable block length is worth to think about. It seems, that x86 and ppc delivers a long per trng instruction call, while on s390 it would make more sense to fill the block.rdseed in a single call. -- Mit freundlichen Grüßen / Kind regards Holger Dengler -- IBM Systems, Linux on IBM Z Development dengler@xxxxxxxxxxxxx