News for hackers. Stuff that matters.
Re:Some AMD CPU's RDRAND might not return random data after ... by loeg on Tuesday May 07, 2019 @06:43PM (#19854124)
Why not use getrandom() with GRND_NONBLOCK?

Worst case, they could run RDRAND in a loop and write() it into /dev/random until getrandom() is unblocked. Then they're still using the ordinary kernel random device, more or less. They wouldn't have these catastrophic collisions due to near-zero entropy.

Re:Some AMD CPU's RDRAND might not return random data after ... by JdeBP on Tuesday May 07, 2019 @08:20PM (#19854729)
Because systemd is not x86-64-only. The actual worst case is where there is no RDRAND, because then the systemd people have the chicken-and-egg situation of not being able to seed urandom without running a system service unit, and not being able to run a systemd service unit without being able to assign a random GUID to it as its instance ID.

The design problem is that every service unit has an instance ID, whether meaningful and useful to it or not, the journal and other things have a machine ID, and journal files have header IDs. This requires that re-seeding urandom be pushed right to the start of the entire user-mode boot process (which begins with systemd in the initramfs on some operating systems), that something else (such as RDRAND) be used until urandom is re-seeded, or that the boot process simply stop and block running the very first service unit until urandom is re-seeded by the kernel.

Re:Some AMD CPU's RDRAND might not return random data after ... by lvh on Tuesday May 07, 2019 @10:15PM (#19855347)
What can systemd do better than GRND_NONBLOCK in the non-x86_64 case?