Message267974
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. |
|
Date |
User |
Action |
Args |
2016-06-09 07:57:55 | vstinner | set | recipients:
+ vstinner, lemburg, ncoghlan, larry, christian.heimes, martin.panter, dstufft, Theodore Tso |
2016-06-09 07:57:55 | vstinner | set | messageid: <1465459075.04.0.420296303967.issue27266@psf.upfronthosting.co.za> |
2016-06-09 07:57:55 | vstinner | link | issue27266 messages |
2016-06-09 07:57:54 | vstinner | create | |
|