a49a3aaa46
Current dev_urandom() assumes that reading /dev/urandom will never block regardless if the random pool is fully initialized or not. This assumption is no longer applicable since linux kerrnel enforces the /dev/urandom entropy initialization from v5.18-rc2 with the commit: 48bff1053c17 ("random: opportunistically initialize on /dev/urandom reads"). With this, when we use the linux v5.18-rc2 or later, dev_urandom() will block if enough random pool is not supplied. It causes the boot delay, typically 1024msec(4msec * 256 = 1024msec) delay to fill the 256 bits entropy for the case CONFIG_HZ=250. To prevent this boot delay, this commit syncs dev_urandom() implementation to the systemd-udev. The systemd-udev implementation of reading /dev/urandom is as follows. - Try to get random with calling getrandom(GRND_INSECURE) - If kernel does not support GRND_INSECURE, fallback to GRND_NONBLOCK - If enough entropy is not supplied, fallback to reading /dev/urandom, this will block when the kernel version is v5.18-rc2 or later With this modification, dev_urandom() tries not to block as much as possible. This modification still keeps the backword compatibility, dev_random() will never block if the commit(48bff1053c17) is not applied to the linux kernel, the behavior is same as before in this case. Signed-off-by: Masahisa Kojima <kojima.masahisa@socionext.com> |
||
---|---|---|
.github/workflows | ||
hwdb | ||
man | ||
rule_generator | ||
rules | ||
src | ||
test | ||
.gitignore | ||
.travis.yml | ||
autogen.sh | ||
BUILD | ||
configure.ac | ||
CONTRIBUTING | ||
COPYING | ||
LEGACY | ||
Makefile.am | ||
NOTES | ||
README.md |
eudev is a standalone dynamic and persistent device naming support (aka userspace devfs) daemon that runs independently from the init system. eudev strives to remain init system and linux distribution neutral. It is currently used as the devfs manager for more than a dozen different linux distributions.
This git repo is a fork of git://anongit.freedesktop.org/systemd/systemd with the aim of isolating udev from any particular flavor of system initialization. In this case, the isolation is from systemd.
This is a project started by Gentoo developers and testing was initially being done mostly on OpenRC. We welcome contribution from others using a variety of system initializations to ensure eudev remains system initialization and distribution neutral. On 2021-08-20 Gentoo decided to abandon eudev and a new project was established on 2021-09-14 by Alpine, Devuan and Gentoo contributors (alphabetical order).
Homepage: https://github.com/eudev-project/eudev
Tarballs of releases: https://github.com/eudev-project/eudev/releases
Old releases (archive): http://dev.gentoo.org/~blueness/eudev/
The eudev community gathers on Libera.Chat:
ircs://irc.libera.chat:6697/#eudev
https://web.libera.chat/#eudev
Active team members (alphabetical order by last name):
Arsen Asenović (Arsen) <arsen@aarsen.me>
Luca Barbato (lu_zero) <lu_zero@gentoo.org>
Anthony G. Basile (blueness) <blueness@gentoo.org>
Boian Bonev (bb|hcb) <boian@bonev.com>
Ariadne Conill (Ariadne) <ariadne@dereferenced.org>
Emeritus team members (alphabetical order by last name):
Francisco Izquierdo (klondike) <klondike@gentoo.org>
Ian Stakenvicius (axs) <axs@gentoo.org>
Matthew Thode (prometheanfire) <prometheanfire@gentoo.org>
Tony Vroon (chainsaw) <tony@linx.net>
Richard Yao (ryao) <ryao@gentoo.org>