From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id B38E324BC0; Thu, 11 Dec 2025 16:23:48 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id B535F24BBA; Thu, 11 Dec 2025 16:23:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) by atuin.qyliss.net (Postfix) with ESMTPS id DE98624BB9 for ; Thu, 11 Dec 2025 16:23:45 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id 909651400150; Thu, 11 Dec 2025 11:23:43 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Thu, 11 Dec 2025 11:23:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1765470223; x= 1765556623; bh=GuPBE220xx+pFLf0zeVHLPkpjwCyAU3Orv/LPzvrzaM=; b=X T2/a2GUUCMMKCMmaZ9CAFs8VYapaQWfAHKsyIYvK0IO5Daxy8jyqPR/wcWpfE/nT ucRyXP+Oh3Or88wMT8EodurTeUEg+ayLKJjosy0wZ2sW4O44/4vg5Z73jV7BXPxK wJlxK0ufIWvJ0ke0lCD+65AtAspJ4Dv3Ef22sqPqZzdH/4ljWKR5JrkCJ2t4O/k+ zR10gXRQ2vbt6a8WfbMZq5xTvlXFyJqNHrgIXnw2H114rnpzvxB0mNVuPMlLzjbb UHyUWJ/bDRqbcgvEQ0js5yLvVU+xHSouiV9/vpOz+QmFVTqw4IufZHFZVhAa5Rt0 yb5upGV3RtQ0uwBdZWqYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1765470223; x=1765556623; bh=G uPBE220xx+pFLf0zeVHLPkpjwCyAU3Orv/LPzvrzaM=; b=LdFM5nCvaG1k01IY2 gwn77xb+O6+CEvj1T2H80o/G+GPvnG9NTVGQHHKLDgnBqlj9kbci/ER8TX9Gr346 U55Lw5TU5dxRB++uD/I1gT/xYCKVkr3sX24PhcAgh73Pd3s/YugzjTUITL07Yt0g JC7k5C6EpEIIXQ2vIlxdqzkdDTG/zetIJupb4BVZpJT5HratYxqSfDI1Q8Do0eyx qmFKO7z2F7F8SQdJp2hZI7VR0QgGIQCbK4q3Gb4032dyLvv1OTV96nvGDGSaNFLI MwGnHKdPfjcgVSr1hwYPejPg8kz4Mx+VhmZKtMWw8ifMQKrDP804A8/2d6486+W9 jpBjg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvheejkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeegueeiud eukeekiedvteffgeekudfhudevvdelvdekhfefieetkeduudejffefgeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep uggvmhhiohgsvghnohhurhesghhmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlse hsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 11 Dec 2025 11:23:43 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id EEDCA6F74868; Thu, 11 Dec 2025 17:23:36 +0100 (CET) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH v2 2/8] host/rootfs: move vsock sockets out of VM dir Date: Thu, 11 Dec 2025 17:21:41 +0100 Message-ID: <20251211162145.124509-4-hi@alyssa.is> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251211162145.124509-2-hi@alyssa.is> References: <20251211162145.124509-2-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: KPLTPGJWWENX5N7M7PEPDDFR34UXUOEG X-Message-ID-Hash: KPLTPGJWWENX5N7M7PEPDDFR34UXUOEG X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Demi Marie Obenour X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This will allow xdg-desktop-portal-spectrum-host to be run as a user without access to the VM directory. Signed-off-by: Alyssa Ross --- v2: no change .../template/data/service/xdg-desktop-portal-spectrum-host/run | 3 ++- tools/start-vmm/lib.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/run index d2bf78ce..57e893d3 100755 --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/run +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/run @@ -6,7 +6,8 @@ importas -i VM VM export DBUS_SESSION_BUS_ADDRESS unix:path=/run/vm/by-id/${VM}/portal-bus -s6-ipcserver-socketbinder -a 0700 /run/vm/by-id/${VM}/vsock_219 +if { mkdir -p /run/vsock/${VM} } +s6-ipcserver-socketbinder -a 0700 /run/vsock/${VM}/vsock_219 # Notify readiness. if { fdmove 1 3 echo } diff --git a/tools/start-vmm/lib.rs b/tools/start-vmm/lib.rs index b44e0375..52c96c5e 100644 --- a/tools/start-vmm/lib.rs +++ b/tools/start-vmm/lib.rs @@ -154,7 +154,7 @@ pub fn vm_config(vm_dir: &Path) -> Result { }, vsock: VsockConfig { cid: 3, - socket: vm_dir.join("vsock").into_os_string().into_string().unwrap(), + socket: format!("/run/vsock/{vm_name}/vsock"), }, landlock_enable: true, landlock_rules: vec![ -- 2.51.0