[haiku-bugs] Re: [Haiku] #14937: Tiny chunks of entropy from /dev/urandom

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sat, 30 Jan 2021 14:46:05 -0000

#14937: Tiny chunks of entropy from /dev/urandom
------------------------+----------------------------
  Reporter:  kallisti5  |      Owner:  nobody
      Type:  bug        |     Status:  new
  Priority:  normal     |  Milestone:  Unscheduled
 Component:  Drivers    |    Version:  R1/Development
Resolution:             |   Keywords:  urandom
Blocked By:             |   Blocking:
  Platform:  All        |
------------------------+----------------------------
Comment (by pulkomandy):

 Looking at our random implementation, by default we use the Yarrow random
 number generator which will always fill the passed buffer completely.

 It looks like we also have a virtio driver, which will get randomness from
 the host (added in 8d2bf6953e851d431fc67de1bc970c40afa79e9f). The commit
 message mentions that "this can have the undesired effect of rendering
 /dev/urandom slow".

 Were you using that when you made this test? Because I tried to run your
 code and did not reproduce your problem without enabling virtio random.
 Then I tried enabling virtio random in qemu (using the command line from
 the commit message) and I got a SMAP violation on boot. Apparently the
 virtio random driver was never updated to use user_memcpy?

 I think the virtio random should be used as an additional or alternative
 entropy source for the Yarrow RNG, and not replace it completely.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14937#comment:6>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: