STINNER Victor added the comment:

I played with select() on Linux on a VM:

* /dev/random: it works as expected
* /dev/urandom: the device is already seen as readable even before the urandom 
entropy pool is initialized. It is not really surprising since, yes, read() 
does not block in practice

To test Python before urandom is initialized, I used the init=/path/to/python 
trick in the boot loader.

By the way, I confirm that getrandom(GRND_NONBLOCK) fails with EAGAIN before 
urandom is initialized.

--

I'm now trying to get a non initialized /dev/urandom in a FreeBSD VM, but it 
seems harder... Even if single user mode, select() on /dev/urandom says that 
the device is ready and yes, it works to read a few bytes. Moreover, "sysctl 
kern.random.sys.seeded" returns 1, which confirms that urandom is already 
initialized.

If even in single mode urandom is already is initialized in a VM, I'm not sure 
that FreeBSD is really impacted by the issue #26839.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27266>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to