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 4ECD5BA37; Fri, 31 Jul 2026 22:00:39 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id C4302B928; Fri, 31 Jul 2026 22:00:30 +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-xb132.google.com (mail-yx1-xb132.google.com [IPv6:2607:f8b0:4864:20::b132]) by atuin.qyliss.net (Postfix) with ESMTPS id 2E0A0B90D for ; Fri, 31 Jul 2026 22:00:29 +0000 (UTC) Received: by mail-yx1-xb132.google.com with SMTP id 956f58d0204a3-66843536f94so1586012d50.3 for ; Fri, 31 Jul 2026 15:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785535228; x=1786140028; 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=PIf71lx4xj/bygGj8T8NJsUyjanbie0nDs/sKT2wrr4=; b=MDy9akTqbVm2Ky8PL1ytiu2NtEve5bOyTiHiBuTTiFr45rrMlYWb1Lv61I6qzPL0Lf eHpkxhcWX91eGiDOFAgBbkNRhhaBrl1Dn48D1igUOz55QNaX/OTP7tVv3JKtBUKBQfy2 a4MVlwbtUaZQmwXrkiwyO8T7FmvQwCv2cvkFspRF4fp8PjvrFo+5so2NVMk2ngV1JQj/ bXdI8uPDvIlEb9UY8gqlBNvWIezDClLu4g2+69SHLwcmDPf0cxFwtymtj84D7Vb7DzNt yCizwuihH3JWCKeVGiZa7mihF11RtKFcEH+Y/YarsLrpQfy5u9cdgaiKxy6feEIy3po3 KTYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785535228; x=1786140028; 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=PIf71lx4xj/bygGj8T8NJsUyjanbie0nDs/sKT2wrr4=; b=FNkO5wyMaAHqk0I/hOpVCMbFO2MtflzruxkxgeQ33TzspBhYJj00V+Iyd+buXJpMun j5V3o0DwUTNaXyT+6CtUbfqaSY6jqbzthnZz+G4ld6k5Vg/8usWXFV3MG6eHXpECZc8H PqLJXD2ySnINX3dkYSQAAtaOHPbLPdYFH6bpT4OD1ar4RPmED+R18am2N7qNLO6nbLsR J8Ct1BtP1rjaFT/AHeDfw82CIDNsuSBANV7440dkNbQuEWbIQmLiEVLEY85TYEQPe8dQ ieJS0mc5Zb5X3fwHTYfqiWEP102ueaP7HHTQpq+LCCCwrkxCAnaBUSa1w0NGDjWVXUTP tPGA== X-Gm-Message-State: AOJu0YxKvbZds5zAR2+l3CVgV69RhAP7il4DlaTTMI+PdBY5C84j+bRH JB6QS0YRLcoREKlvVwn5Ot4FswgW1d4MvI+xXf6kAhLdQvSN5MCAJEshxqZALQ== X-Gm-Gg: AR+sD11q/27y9FAj5zeuvp8fdZ+PYC2uCcMR+DVS+k9OUBdU+26zdmNbD+xHrxXoqhM bZUrtsy4V6AZTgGUftWHfC8bZji7KoBuRbAyhbbL+eXWrTahwtq9/Kc8gggcqsoAjytgcxP8fbw D9QLdkoUZpEB3hkjTctOYPT7wxbNZDaT8kLZN6vE9eKASYQMzN9wmL3oZG5tuRdYla7NqwsK0IT 7OA5cuHvohTTGRzttM3ljRSBZxRNYxo70f5H0tdeh8P/SYYfU21R4xr20tPTOyGxIMehOKTcFlA F+imVApxOdoImL4ynWEqpadTaETAPDE4Xrxw3cnpSIsiwX8SNSG06s+zjvkDfPX7of2lUlxJjjD bgaIU/kx8nW1QJ4qzNSRHGhPtkigk5EbM7uJvcjTI7she2Ff5eAl70FyamJT5l+I2hABwYkkWM4 /HUdH+gWdsVSXVNBy01uuS+uDSYVGQcpoZC2qgAkuxanqOdqrIv/vMJInG4mPPm3S/lbs3C/Mke A== X-Received: by 2002:a05:690e:43d3:b0:667:83ad:b3e6 with SMTP id 956f58d0204a3-6694f06fdfcmr1609631d50.16.1785535227449; Fri, 31 Jul 2026 15:00:27 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 956f58d0204a3-6694903782fsm1354997d50.21.2026.07.31.15.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 15:00:26 -0700 (PDT) From: Demi Marie Obenour Date: Fri, 31 Jul 2026 17:54:45 -0400 Subject: [PATCH v5 05/19] host/rootfs: Enable controllers in non-root cgroups MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260731-cgroups-v5-5-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=823; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=hJ1NUOnyGVfiVBpEokZyDLPqDWxQswq+YNjY9cVekvw=; b=t/qBpnPanVGbWt4yddjjiimqNq/xfJalnQ4yFGreFVlflH6ePIXhvzH8Ie5nXc059FaoqqipH /X9XaxSkrxhD65NZn3IkU/cdhjp20W9JiHQEzbFypXt48B7riBgJxA5 X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: 6AYXAB5PZFA7KLBJ6MSAWKUI733CQQXF X-Message-ID-Hash: 6AYXAB5PZFA7KLBJ6MSAWKUI733CQQXF 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: This is done with sed and execline to avoid special-cases in the cgroup manager. Signed-off-by: Demi Marie Obenour --- host/rootfs/image/etc/init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/host/rootfs/image/etc/init b/host/rootfs/image/etc/init index 8ec7859ab00e24007a93d4000c8f34e353de50ae..2ab09d272702c0ea9daf6cf8bc880645a32eb2f0 100755 --- a/host/rootfs/image/etc/init +++ b/host/rootfs/image/etc/init @@ -12,4 +12,7 @@ if { /bin/ln -s /proc/self/fd/2 /dev/stderr } if { /bin/mount --make-shared / } if { /bin/mount -a --mkdir } +# Enable subtree control of all cgroups. +if { sed -nE "s/(^| )/&+/g; w /sys/fs/cgroup/cgroup.subtree_control" /sys/fs/cgroup/cgroup.controllers } + /bin/s6-linux-init -c /etc/s6-linux-init -s /run/param -- $@ -- 2.55.0