From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: Yureka Lilian <yureka@cyberchaos.dev>,
Demi Marie Obenour <demiobenour@gmail.com>
Subject: [PATCH] host/rootfs: fix vm-console
Date: Sat, 20 Jun 2026 21:46:36 +0200 [thread overview]
Message-ID: <20260620194635.53707-2-hi@alyssa.is> (raw)
cloud-hypervisor was being run with its own /dev/pts, so vm-console
couldn't find the VM PTY to open it. Furthermore, for Cloud
Hypervisor to actually use the global /dev/pts now that it runs as
non-root, it needs to be able to open /dev/pts/ptmx. ptmxmode=666
matches how systemd mounts /dev/pts.
Fixes: 6138e44a ("host/rootfs: run Cloud Hypervisor as non-root")
Fixes: ec47d362 ("host/rootfs: Sandbox Cloud Hypervisor")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
Posting to the list in particular to give a chance to anybody who
wants to tell me the sandboxing should be done a different way.
host/rootfs/image/etc/fstab | 2 +-
host/rootfs/image/usr/bin/run-vmm | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/host/rootfs/image/etc/fstab b/host/rootfs/image/etc/fstab
index 18bb5e45..4d52a1da 100644
--- a/host/rootfs/image/etc/fstab
+++ b/host/rootfs/image/etc/fstab
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2020-2021, 2025 Alyssa Ross <hi@alyssa.is>
proc /proc proc nosuid,nodev,noexec 0 0
-devpts /dev/pts devpts nosuid,noexec,gid=5,mode=620 0 0
+devpts /dev/pts devpts nosuid,noexec,gid=5,mode=620,ptmxmode=666 0 0
tmpfs /dev/shm tmpfs nosuid,nodev 0 0
tmpfs /media tmpfs nosuid,nodev,noexec,nosymfollow,mode=755 0 0
sysfs /sys sysfs nosuid,nodev,noexec 0 0
diff --git a/host/rootfs/image/usr/bin/run-vmm b/host/rootfs/image/usr/bin/run-vmm
index 94199434..6967dc55 100755
--- a/host/rootfs/image/usr/bin/run-vmm
+++ b/host/rootfs/image/usr/bin/run-vmm
@@ -93,6 +93,7 @@ bwrap
--unshare-user
--dev /dev
--dev-bind /dev/kvm /dev/kvm
+ --dev-bind /dev/pts /dev/pts
--dev-bind /dev/vfio /dev/vfio
--tmpfs /dev/shm
--tmpfs /tmp
base-commit: 57bf21eaf65ca5a42d18999ba65f96dcd338113c
--
2.54.0
next reply other threads:[~2026-06-20 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-20 19:46 Alyssa Ross [this message]
2026-06-21 1:31 ` [PATCH] host/rootfs: fix vm-console Demi Marie Obenour
2026-06-24 8:47 ` 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=20260620194635.53707-2-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=demiobenour@gmail.com \
--cc=devel@spectrum-os.org \
--cc=yureka@cyberchaos.dev \
/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).