From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Subject: [PATCH 4/5] Don't change mode of unmatched devtmpfs devices
Date: Thu, 13 Nov 2025 14:26:41 +0100 [thread overview]
Message-ID: <20251113132642.92899-4-hi@alyssa.is> (raw)
In-Reply-To: <20251113132642.92899-1-hi@alyssa.is>
Otherwise, it falls back to the default rule, which sets mode 0660.
Not ideal for e.g. /dev/null!
Fixes: 88f2695 ("Initial commit")
Fixes: aeb5104 ("Initial commit")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
img/app/image/etc/mdev.conf | 5 ++++-
vm/sys/net/image/etc/mdev.conf | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/img/app/image/etc/mdev.conf b/img/app/image/etc/mdev.conf
index 7382067..df215b9 100644
--- a/img/app/image/etc/mdev.conf
+++ b/img/app/image/etc/mdev.conf
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: EUPL-1.2+
-# SPDX-FileCopyrightText: 2021-2023 Alyssa Ross <hi@alyssa.is>
+# SPDX-FileCopyrightText: 2021-2023, 2025 Alyssa Ross <hi@alyssa.is>
-$MODALIAS=.* 0:0 0 ! +importas -Siu MODALIAS modprobe -q $MODALIAS
$INTERFACE=.* 0:0 0 ! +/etc/mdev/iface
$MODALIAS=virtio:d0000001Av.* 0:0 0 ! +/etc/mdev/virtiofs
dri/card0 0:0 660 +background { /etc/mdev/listen card0 }
snd/controlC0 0:0 660 +background { /etc/mdev/listen controlC0 }
+
+# Don't change mode of other device nodes created by devtmpfs.
+.* 0:0 0 !
diff --git a/vm/sys/net/image/etc/mdev.conf b/vm/sys/net/image/etc/mdev.conf
index 412f7f5..2a7e5fe 100644
--- a/vm/sys/net/image/etc/mdev.conf
+++ b/vm/sys/net/image/etc/mdev.conf
@@ -1,5 +1,8 @@
# SPDX-License-Identifier: EUPL-1.2+
-# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
+# SPDX-FileCopyrightText: 2021, 2025 Alyssa Ross <hi@alyssa.is>
-$MODALIAS=.* 0:0 0 ! +importas -Siu MODALIAS modprobe -q $MODALIAS
$INTERFACE=.* 0:0 0 ! +/etc/mdev/iface
+
+# Don't change mode of other device nodes created by devtmpfs.
+.* 0:0 0 !
--
2.51.0
next prev parent reply other threads:[~2025-11-13 13:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 13:26 [PATCH 1/5] pkgs: mdevd: backport bugfix Alyssa Ross
2025-11-13 13:26 ` [PATCH 2/5] Use 0 mode in mdev.conf when not changing mode Alyssa Ross
2025-11-26 21:11 ` Alyssa Ross
2025-11-13 13:26 ` [PATCH 3/5] Don't create/chmod device nodes in generic rules Alyssa Ross
2025-11-26 21:11 ` Alyssa Ross
2025-11-13 13:26 ` Alyssa Ross [this message]
2025-11-26 21:11 ` [PATCH 4/5] Don't change mode of unmatched devtmpfs devices Alyssa Ross
2025-11-13 13:26 ` [PATCH 5/5] vm/sys/net: run dbus-daemon as non-root Alyssa Ross
2025-11-26 21:11 ` Alyssa Ross
2025-11-26 21:11 ` [PATCH 1/5] pkgs: mdevd: backport bugfix Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251113132642.92899-4-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).