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 8F4C39608; Thu, 06 Aug 2026 01:20:30 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 4E7449521; Thu, 06 Aug 2026 01:20:26 +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-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by atuin.qyliss.net (Postfix) with ESMTPS id 70BAC958C for ; Thu, 06 Aug 2026 01:20:25 +0000 (UTC) Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-81ea0b7d137so14638727b3.2 for ; Wed, 05 Aug 2026 18:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785979224; x=1786584024; 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=v8OugEZrYpOk+Pvwph3L13NNUOfTiIluRkgZoy2VbRs=; b=szENmvT48uaVM0VbWzdOZYZcNJNTpQbMow/ES+vgXXPUJVfy+7fv6r7Y1k65q+bnIz 1H+QND9S0ta6faHznyqbu5toJ0Yf9KKqZ2+YLi3d74OutZmJG5TGudAq5zM2rwJzRzs7 0yf1GYKddNqQlW5vo1mZ5wznIQPdM8TNSFiNaR/2QF30jdda/VjbsjmZJw58ZWWsT0op XmS4SClcdvQYL9ZRnJsEVtYymffFOtcYmeCCQybmDzN23zKnynvfd2x3eu5VPh1PG4oe Uw6bqY1PtI7k7rm+6dvzH6NIMnr++Cr5WPHo5dMEBelQr2fGHhxRUynW5fYmrxkLolVQ csUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785979224; x=1786584024; 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=v8OugEZrYpOk+Pvwph3L13NNUOfTiIluRkgZoy2VbRs=; b=JxoIv0TebuaTqtb48GNh7ehmADxX/VE46oV773PeeM9bIzO2T+oChTWNHgCW2kpefE f7Yb8HUow94VPmQWqYVvy8dCURLfiQSg12cU7njiAh8Tzw4+4wUOxNQ9mFl4NTpy8Yp8 yF20ak3q9BpoWG0DO5fV/aQynysWClKxEMza+FO7WG50IpPOII6AikbDtx/gKX6x/0g5 MrDg2WiMte8VSs0oVi3CKqOO8epUuZ1u2evUk1+zc4XfVM4qiYwqBm+NqzLJdAghN3ag 6dtdw5mgA5RSttz0qnA288UP6Z7cvuLKk6H8mhcxss22J1pKvYBn9+h6LACLV93sAhdk RacA== X-Gm-Message-State: AOJu0Yz9nwYhpqP6+gLg2JetMZS0v5Fr/9zqNMLrMU7JAlh1jsHFfHBx OdX4XiyyBrYhjtmJ6MgPEzwZyjb+tZTzx5n36xGWSOLZ1jadhdUKKbQ9l9MbBA== X-Gm-Gg: AR+sD13KSF+ahXTPtI/NPwxphe23hah7W8yBiKsy2hplT7QCoOwD9u9bU5XMY1PcnTk funujmdVcyZ7XkB02jQf8RcTSnUbhayyi2aKEQ8bpXAZQ/mJGsqBnrq9KqQevvBc18dBP7u0pHe MMY+9TFaPqqU6ESni9PCkE8geMWGh+yyu6DA7QrHdw10SYDzlzoxtSJirS6qZO2uQ5WJO8wOVfK IZUTBVzkYI1BH1lNU4LXVGsKfMO9FKO1FBn/WWfcGUiaIpuOSqWU4fWZsnqAPuC8Yh7D1jDqb8E xdQHSvQUUntAEaT7PDbojtQMtHTDtxBrLTSYZ/XKyV0d2yoJoZJ9ucVdtsJtwX4I/xg8c+usysp 7gzickMXTHasT8HDHbjpemhzBK00ksdVQpW+rzLSUOvCctmHaTMrjYSyQGduKiV+DRiowsWtQUM t9bT7L2vX2lhwcX8FqqzJxwVjXZV07Livvz/O8+bixAPjq0El+P3xtXTTTHuZfXr4cGNegnpciQ g== X-Received: by 2002:a05:690c:350c:b0:7ff:19d6:74ee with SMTP id 00721157ae682-82023fd349dmr68612007b3.33.1785979224284; Wed, 05 Aug 2026 18:20:24 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-8201a954e73sm23146977b3.48.2026.08.05.18.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 18:20:23 -0700 (PDT) From: Demi Marie Obenour Date: Wed, 05 Aug 2026 21:16:23 -0400 Subject: [PATCH v6 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: <20260805-cgroups-v6-16-086c0f00f55f@gmail.com> References: <20260805-cgroups-v6-0-086c0f00f55f@gmail.com> In-Reply-To: <20260805-cgroups-v6-0-086c0f00f55f@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1785978967; l=2946; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=czHF9S25lLmh6nQMKu+eoxVZlF/qlG066Q8Lot4yNJ0=; b=0nnsjeqzb+N1FjDkvv3GdhUuz7RjaNy+daNKi7O+oRbMLj1UOZww2brgvJ9hkUMJMinNpp68E ZhhSoo8vSuGBEzSO/SPMUkkdtrYlUgb+4fMItSbSN/EEKWk6holo2fj X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: TJQV6D5OU5YWSSD7MY2B4V7D2M4MFG2K X-Message-ID-Hash: TJQV6D5OU5YWSSD7MY2B4V7D2M4MFG2K 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..8b63639fb196abfbb703f7ac6dc974f9838124d9 --- /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-FileCopyrightText: 2026 Demi Marie Obenour +# SPDX-License-Identifier: EUPL-1.2+ + +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