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 8F8ACBC8E; Fri, 31 Jul 2026 22:00:57 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 19167BAE8; Fri, 31 Jul 2026 22:00:47 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-yx1-xb133.google.com (mail-yx1-xb133.google.com [IPv6:2607:f8b0:4864:20::b133]) by atuin.qyliss.net (Postfix) with ESMTPS id 9DFC5BAD5 for ; Fri, 31 Jul 2026 22:00:45 +0000 (UTC) Received: by mail-yx1-xb133.google.com with SMTP id 956f58d0204a3-66896892b6cso1879722d50.0 for ; Fri, 31 Jul 2026 15:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785535244; x=1786140044; darn=spectrum-os.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cMiBjWKrVtSXx6hcKjmR68+5QW2ReC7riMMnNoLsz54=; b=M87Ofl2Wc/0pDkk34rWMMO67+EGBHeK3yLjGSLHSWQCy0Jlfci04J0Oz8uSdfz5XGY Y7XGVpla0Qjtv3MSn7kn9/AQWXh4ZHtEKAfvedtOMcUyfSuxM3RKaHRsDEfifgK3e6+v ONLxkxuyNi3H1pLRfxPNjhdkDlyisyhTnHVaJ6QvsfPTdJ7zLC+LU75+r8WzXLHv+wea oVgfu6VyWZ7jeL2trFMJ+bLS6ruLiJc+8GUX4+r2h0Nh0zdtTqR+npelxSe6zc1v9LLA E3QETAaFrJjnNqCBl+RLveq0c6JAHO9bGo+KxnX91hauric2ODmE/Q7WJqwIAs4ZM2Nu 7F0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785535244; x=1786140044; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=cMiBjWKrVtSXx6hcKjmR68+5QW2ReC7riMMnNoLsz54=; b=mm16BY/eGYQhgEtXYjMgppHGFvH7MXKwYISPy1MYlqEMzT3dzc4uqvPv3UGEndvwj0 JEbPpgfUwylmlE+lnSQ2SU1uHL8ayW/ijP28Dm4gFMqaC4vHg4HTIaMXOPNjoChwPuU/ Xlis5II2usQq1bJDhaDfOi3yQat06K7T8hM/O6DIt1pjiGY0HVJpRzO/za1ANy0G6aCb rk6fBvng5iwhbfW3WB/uJznh789DlJXNb6Xq0eC0DMikDyXBFP3aukcHuZqDHMgSSV6a IbueUpB2HwKXbP8Yi8gH78JJclXpdWGsipFQW3P76U7KCD3FyrP3TrfVg6knt4Qtnvjp l2AA== X-Gm-Message-State: AOJu0YxByR4zpp9vbWfAAMnI2Sy0GN3hYANlwl07qbI6/Yy6dn7TsTyZ aITFLowTJ0SBZjmmK7jXqNjzwkOzIVY6q9eiyrW2IKPuxy1/El8rYNokOOSbYg== X-Gm-Gg: AR+sD10u9gX78tdFsVju56iwVpi/8F6PMuQEuMnwcPkrIoIcJoNbJAjmWmcDisaLkG0 CAfx9qwphcy1Mu6Yunn00EmRbI5I3fvIwDCnLo1Fe/xbW26a3OOEOgx495HlpCkAR6h26+ZA4CW Xo/sbF+duWqe39qHwcbFkpzbeYbjlJUzurzQJ3LbiFUzi2d8YvAwwvSbsuprscx41vLswvQu5n5 WFPQ8u9127PUKAHNzk5hFRdOAQ6mz2QETr161JlGbe798RuCh23MfWwJdZwA9qGPddIlxiCDQES Eejiov9gwdrpTF97Dhgw/wDgK7I7aduc2+ICkdbMwevgXohgTFAbuuO+Rf7sBwEEl5czIK7YlTA 8ECPcGiesHZMKKn7o/BGyaqOmr2BBQ9+B22tnKbWFWoKYptLyRJ7jkmAzs4DZik9cxqdIr434bX tVg8dmZKUoPRlQ7ZbveNjIM31XQ7jb7TCz50tUQ77kcW3VW7usKLIYI3dUSySGglYjEeD/cNIac w== X-Received: by 2002:a53:d508:0:b0:667:77cd:9c3d with SMTP id 956f58d0204a3-6694f1832fcmr1537110d50.36.1785535244040; Fri, 31 Jul 2026 15:00:44 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 956f58d0204a3-66948cff660sm1350205d50.3.2026.07.31.15.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 15:00:42 -0700 (PDT) From: Demi Marie Obenour Date: Fri, 31 Jul 2026 17:54:56 -0400 Subject: [PATCH v5 16/19] host/rootfs: vhost-user-fs: Run in cgroup MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260731-cgroups-v5-16-b325bac9d34f@gmail.com> References: <20260731-cgroups-v5-0-b325bac9d34f@gmail.com> In-Reply-To: <20260731-cgroups-v5-0-b325bac9d34f@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1785534880; l=2946; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=NrC5X++NEX8tmBKRdoNfFn8wLRlDVxKxytH8Is4JIWw=; b=80HzCF5F479KxhKYwzSoBRcXRwEYt/v4YY3+DA0gm3166riT6gjOhVe14CG3KAuQHmoqejx/O QIDevYjBIi6D0/zSsx3eki33APla28uVCPrN2hkQ6m0zlKUCkUmCADD X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: ON7H4JEWRORNWZ5FOS4XUEUR5TS76N4S X-Message-ID-Hash: ON7H4JEWRORNWZ5FOS4XUEUR5TS76N4S X-MailFrom: demiobenour@gmail.com X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; 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; emergency CC: Demi Marie Obenour , Alyssa Ross X-Mailman-Version: 3.3.10 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Demi Marie Obenour --- host/rootfs/file-list.mk | 1 + .../service/vm-services/template/data/service/vhost-user-fs/finish | 5 +++++ .../service/vm-services/template/data/service/vhost-user-fs/run | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk index ea88f25aa4d5b96d29ed86975db12c2b047a0468..e9b15f7ed466da0535809717de3c655b5f93d0f7 100644 --- a/host/rootfs/file-list.mk +++ b/host/rootfs/file-list.mk @@ -34,6 +34,7 @@ FILES = \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/spectrum-router/down \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/spectrum-router/notification-fd \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/spectrum-router/run \ + image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/finish \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/notification-fd \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/notification-fd \ diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/finish b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/finish new file mode 100755 index 0000000000000000000000000000000000000000..b1fb5799a949a5e69d5926a2145873da5f09e0a3 --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/finish @@ -0,0 +1,5 @@ +#!/usr/bin/execlineb -WS3 +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2026 Demi Marie Obenour + +cgroup-purge $3 diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run index cb059aebc8dfe2c8a5b059d5bfea884de53bf922..fe5e2f76d50bab0a75b897649041d46d9e95ff6b 100755 --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run @@ -2,9 +2,12 @@ # SPDX-License-Identifier: EUPL-1.2+ # SPDX-FileCopyrightText: 2021-2025 Alyssa Ross -s6-ipcserver-socketbinder -a 0700 -B env/virtiofsd.sock +cgroup-setup --leaf -- $1 importas -i VM VM + +s6-ipcserver-socketbinder -a 0700 -B env/virtiofsd.sock + if { chown vmm-${VM} env/virtiofsd.sock } if { fdmove 1 3 echo } -- 2.55.0