eudev: upgrade 3.2.14 -> 3.2.15
v2 cover eudev: upgrade 3.2.14 -> 3.2.15
eudev 3.2.15 adds a render group for DRM render nodes, so we add that to base-passwd first, then upgrade eudev.
---
Changes in v2:
- add a fix, submitted upstream, for a use-after-free new in 3.2.15
- eudev: link the upstream release notes instead of the shortlog
- Link to v1: https://patch.msgid.link/[email protected]
---
Alex Kiernan (2):
base-passwd: add the render group for eudev-3.2.15
eudev: upgrade 3.2.14 -> 3.2.15
.../0001-base-passwd-add-the-render-group.patch | 29 +++++
meta/recipes-core/base-passwd/base-passwd_3.6.8.bb | 16 +++
....c-sync-dev_urandom-implementation-to-sys.patch | 138 ---------------------
...01-udevd-keep-a-copy-of-the-event-devnode.patch | 101 +++++++++++++++
meta/recipes-core/udev/eudev/netifnames.patch | 17 ---
.../udev/{eudev_3.2.14.bb => eudev_3.2.15.bb} | 5 +-
6 files changed, 148 insertions(+), 158 deletions(-)---
base-commit: 7803450fd5ecc1bb714abadfbe3ec340e930139a
change-id: 20261015-eudev-3-2-15-e406a27a8c72
Best regards,
Signature · 1 line
Alex Kiernan <[email protected]>
PATCH v2 1/2 base-passwd: add the render group for eudev-3.2.15
Also add a comment to document why we add groups here and not in eudev, and why they're not submitted upstream.
--- .../0001-base-passwd-add-the-render-group.patch | 29 ++++++++++++++++++++++ meta/recipes-core/base-passwd/base-passwd_3.6.8.bb | 16 ++++++++++++ 2 files changed, 45 insertions(+)
meta/recipes-core/base-passwd/base-passwd/0001-base-passwd-add-the-render-group.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 8e1b08f3e701bb08b57c85c6818991f92a9611ae Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <[email protected]> +Date: Thu, 15 Oct 2026 10:58:02 +0100 +Subject: [PATCH] base-passwd: add the render group + +eudev-3.2.15 adds the render group: + + Use the dedicated render group for /dev/dri/renderD*, kfd and accel + devices, as systemd does. Access is unchanged (mode 0666); systems + without a render group log an error and keep them root-owned. + +Upstream-Status: Inappropriate [oe-specific] +Signed-off-by: Alex Kiernan <[email protected]> +--- + group.master | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/group.master b/group.master +index a0f9daf92d57..20ea5da3a450 100644 +--- a/group.master ++++ b/group.master +@@ -35,6 +35,7 @@ sasl:*:45: + plugdev:*:46: + kvm:*:47: + sgx:*:48: ++render:*:49: + staff:*:50: + games:*:60: + shutdown:*:70:
meta/recipes-core/base-passwd/base-passwd_3.6.8.bb +16 -0
@@ -5,6 +5,21 @@ SECTION = "base" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" +# We carry a number of extra groups in group.master which can neither go +# upstream nor be created by the recipes which need them: +# +# - Upstream base-passwd only serves Debian and Debian-based systems. Debian +# policy (9.2.2) restricts base-passwd to IDs which must be statically +# allocated and identical everywhere; any other group is created by the +# package which needs it (adduser/systemd-sysusers). Upstream has told us +# anyone else using base-passwd is on their own: +# https://salsa.debian.org/debian/base-passwd/-/merge_requests/17 +# +# - We can't create them with useradd.bbclass in the recipes which use them. +# Using useradd also brings shadow's login into the image, which fails with +# "setgid: Function not implemented" on kernels without CONFIG_MULTIUSER, +# unlike busybox's login. + SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar.xz \ file://0001-Add-a-shutdown-group.patch \ file://0002-Use-bin-sh-instead-of-bin-bash-for-the-root-user.patch \
@@ -14,6 +29,7 @@ SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar file://0007-Add-wheel-group.patch \ file://0001-base-passwd-Add-the-sgx-group.patch \ file://0001-Add-clock-group.patch \ + file://0001-base-passwd-add-the-render-group.patch \ " SRC_URI[sha256sum] = "fab3d0e6e8b641e116bda9bd5f7a7ed24482384c1513f6a369b506327fbc8dde"
Signature · 1 line
2.43.0
PATCH v2 2/2 eudev: upgrade 3.2.14 -> 3.2.15
In reply to Alex KiernanRelease notes: https://github.com/eudev-project/eudev/releases/tag/v3.2.15
Drop netifnames.patch and the random-util backport, both now upstream.
Add a fix, submitted upstream, for a use-after-free new in 3.2.15 that intermittently crashes udevd during coldplug on musl.
AI-Generated: Claude Opus 5.5 (Claude Code)
---
....c-sync-dev_urandom-implementation-to-sys.patch | 138 ---------------------
...01-udevd-keep-a-copy-of-the-event-devnode.patch | 101 +++++++++++++++
meta/recipes-core/udev/eudev/netifnames.patch | 17 ---
.../udev/{eudev_3.2.14.bb => eudev_3.2.15.bb} | 5 +-
4 files changed, 103 insertions(+), 158 deletions(-)meta/recipes-core/udev/eudev/0001-random-util.c-sync-dev_urandom-implementation-to-sys.patch deleted +0 -138
@@ -1,138 +0,0 @@ -From 95c871b7b912f39539777ac222ef7f8798bb0225 Mon Sep 17 00:00:00 2001 -From: Masahisa Kojima <[email protected]> -Date: Thu, 25 Apr 2024 17:23:10 +0900 -Subject: [PATCH] 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. - -Upstream-Status: Backport [a49a3aaa460add6ae7ea208b4cac630e56fe1180] -Signed-off-by: Masahisa Kojima <[email protected]> ---- - src/shared/missing.h | 4 +++ - src/shared/random-util.c | 70 ++++++++++++++++++---------------------- - 2 files changed, 35 insertions(+), 39 deletions(-) - -diff --git a/src/shared/missing.h b/src/shared/missing.h -index 1967840cdbf3..1caec0f9207c 100644 ---- a/src/shared/missing.h -+++ b/src/shared/missing.h -@@ -79,6 +79,10 @@ static inline int getrandom(void *buffer, size_t count, unsigned flags) { - #define GRND_RANDOM 0x0002 - #endif - -+#ifndef GRND_INSECURE -+#define GRND_INSECURE 0x0004 -+#endif -+ - #ifndef BTRFS_IOCTL_MAGIC - #define BTRFS_IOCTL_MAGIC 0x94 - #endif -diff --git a/src/shared/random-util.c b/src/shared/random-util.c -index 01a28c8ef4e9..852b00e4ce2b 100644 ---- a/src/shared/random-util.c -+++ b/src/shared/random-util.c -@@ -31,45 +31,37 @@ - #include "util.h" - - int dev_urandom(void *p, size_t n) { -- static int have_syscall = -1; -- -- _cleanup_close_ int fd = -1; -- int r; -- -- /* Gathers some randomness from the kernel. This call will -- * never block, and will always return some data from the -- * kernel, regardless if the random pool is fully initialized -- * or not. It thus makes no guarantee for the quality of the -- * returned entropy, but is good enough for or usual usecases -- * of seeding the hash functions for hashtable */ -- -- /* Use the getrandom() syscall unless we know we don't have -- * it, or when the requested size is too large for it. */ -- if (have_syscall != 0 || (size_t) (int) n != n) { -- r = getrandom(p, n, GRND_NONBLOCK); -- if (r == (int) n) { -- have_syscall = true; -- return 0; -- } -- -- if (r < 0) { -- if (errno == ENOSYS) -- /* we lack the syscall, continue with -- * reading from /dev/urandom */ -- have_syscall = false; -- else if (errno == EAGAIN) -- /* not enough entropy for now. Let's -- * remember to use the syscall the -- * next time, again, but also read -- * from /dev/urandom for now, which -- * doesn't care about the current -- * amount of entropy. */ -- have_syscall = true; -- else -- return -errno; -- } else -- /* too short read? */ -- return -ENODATA; -+ static bool have_getrandom = true, have_grndinsecure = true; -+ _cleanup_close_ int fd = -EBADF; -+ -+ if (n == 0) -+ return 0; -+ -+ for (;;) { -+ ssize_t l; -+ -+ if (!have_getrandom) -+ break; -+ -+ l = getrandom(p, n, have_grndinsecure ? GRND_INSECURE : GRND_NONBLOCK); -+ if (l > 0) { -+ if ((size_t) l == n) -+ return 0; /* Done reading, success. */ -+ p = (uint8_t *) p + l; -+ n -= l; -+ continue; /* Interrupted by a signal; keep going. */ -+ } else if (l == 0) -+ break; /* Weird, so fallback to /dev/urandom. */ -+ else if (errno == ENOSYS) { -+ have_getrandom = false; -+ break; /* No syscall, so fallback to /dev/urandom. */ -+ } else if (errno == EINVAL && have_grndinsecure) { -+ have_grndinsecure = false; -+ continue; /* No GRND_INSECURE; fallback to GRND_NONBLOCK. */ -+ } else if (errno == EAGAIN && !have_grndinsecure) -+ break; /* Will block, but no GRND_INSECURE, so fallback to /dev/urandom. */ -+ -+ break; /* Unexpected, so just give up and fallback to /dev/urandom. */ - } - - fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY);
meta/recipes-core/udev/eudev/0001-udevd-keep-a-copy-of-the-event-devnode.patch new file +101 -0
101 lines not on this page · raw message
meta/recipes-core/udev/eudev/netifnames.patch deleted +0 -17
@@ -1,17 +0,0 @@ -eudev: consider ID_NET_NAME_MAC as an interface name - -eudev might not create names based on slot or path. - -Upstream-Status: Backport [github.com/eudev-project/eudev/pull/274] - -Signed-off-by: Joe Slater <[email protected]> - ---- a/rules/80-net-name-slot.rules -+++ b/rules/80-net-name-slot.rules -@@ -10,5 +10,6 @@ ENV{net.ifnames}=="0", GOTO="net_name_sl - NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}" - NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}" - NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}" -+NAME=="", ENV{ID_NET_NAME_MAC}!="", NAME="$env{ID_NET_NAME_MAC}" - - LABEL="net_name_slot_end"
meta/recipes-core/udev/eudev_3.2.15.bb renamed from meta/recipes-core/udev/eudev_3.2.14.bb +2 -3
@@ -10,13 +10,12 @@ DEPENDS = "gperf-native" PROVIDES = "udev" SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ - file://netifnames.patch \ file://init \ file://local.rules \ - file://0001-random-util.c-sync-dev_urandom-implementation-to-sys.patch \ + file://0001-udevd-keep-a-copy-of-the-event-devnode.patch \ " -SRC_URI[sha256sum] = "8da4319102f24abbf7fff5ce9c416af848df163b29590e666d334cc1927f006f" +SRC_URI[sha256sum] = "eb69809fc0d1187f2463ab2149c53aa9f42a78e59f14ebea68eae6cb6b4fc1c3" GITHUB_BASE_URI = "https://github.com/eudev-project/eudev/releases"
Signature · 1 line
2.43.0