Repository for eudev development
Go to file
Masahisa Kojima a49a3aaa46 random-util.c: sync dev_urandom implementation to systemd-udev
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>
2024-04-26 10:40:17 +09:00
.github/workflows Add the missing xsltproc deps 2022-04-06 05:37:52 +03:00
hwdb hwdb: Add Chromebook accel orientation quirks based on sysfs label 2022-09-22 01:28:34 +03:00
man Commit the generated man page 2023-10-05 20:20:45 +03:00
rule_generator man: remove UDEV_LOG environment variable 2017-12-05 08:45:57 -05:00
rules 80-net-name-slot.rules: consider ID_NET_NAME_MAC as a name 2024-01-17 08:59:39 -08:00
src random-util.c: sync dev_urandom implementation to systemd-udev 2024-04-26 10:40:17 +09:00
test Fix warnings 2022-04-06 06:55:28 +03:00
.gitignore Rework dmi_memory_id from systemd 2022-10-04 17:38:38 +03:00
.travis.yml travis: Add docbook dep 2016-11-26 00:25:36 +01:00
autogen.sh autotools: make autogen.sh exit on failure 2021-09-30 01:13:25 +02:00
BUILD build: Add libtool as build-dependency for Alpine 2024-02-28 08:29:51 +01:00
configure.ac bump version to 3.2.14 2023-08-11 23:16:10 +00:00
CONTRIBUTING Better wording 2024-02-29 02:52:58 +00:00
COPYING Final step of revamping the build system 2012-11-15 21:47:20 -05:00
LEGACY src/udev/udev-builtin-kmod.c: remove the modprobe alt to kmod code 2015-02-11 18:06:47 -05:00
Makefile.am configure.ac: add option to disable building programs 2017-01-01 18:19:58 -05:00
NOTES skip: udevd: manager - move a few global variables into the Manager object 2015-07-20 09:22:48 -04:00
README.md Update as per IRC discussion 2023-05-30 16:16:33 +00:00

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>

Build status

Build Status