Re: [PATCH v1 1/1] s390/arch_random: Buffer true random data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux