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 B18D92A37; Mon, 13 Jul 2026 09:39:31 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id A9991295E; Mon, 13 Jul 2026 09:39:28 +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-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) by atuin.qyliss.net (Postfix) with ESMTPS id D09E12A15 for ; Mon, 13 Jul 2026 09:39:26 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 257EB14000C4; Mon, 13 Jul 2026 05:39:25 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Mon, 13 Jul 2026 05:39:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1783935565; x=1784021965; bh=gbY8Cif9p4 nl6dKNrwklcVrtT2ZBqUuAfRh9Y4D9ouM=; b=Vx42Cz9aXnnIeN8ophMsa3ShKE gJvHEu+LB3SifrxRAbSpCIiUQ7HbJBeqdk0kJkQ9XfdQlA8xMP/RP1/b2fbNJc4Z qTuyafzsFC99P0TijoB7hpO/uI2/88gdNN0+gPsBe31RgZwMAC/5WwiMJSaPwkZw G27NMDAhmVqsowSeYRLh7w/nNlXOiRO0HC5YDRbMfavaqV/GNSWrU5LKAjPfr53Z e0hX95HOvsVPMislqhSx9hoO6I/8P1HpF1aEJSzx8ansi3QIDOSBifPodGZpCaz8 agsAfxV7bYdsnKAbxGdODQ+Zt7inINpgrI2f8k6eYuP6HoSqmEB/RzsiGFiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type: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=fm2; t= 1783935565; x=1784021965; bh=gbY8Cif9p4nl6dKNrwklcVrtT2ZBqUuAfRh 9Y4D9ouM=; b=G48edJMx1+cvu8pKsIPsHY1mfRxIzSVJPJE+rMCH7Z2vQFiirSp 7q4EGEcKbQvX6TBFIVbYwkt+RwN8ME8362jQZArQPpC1Wxqjjb1FmSFbhzE+r/mj N9zQeTj6TnETJ8Hhspc/22r/Jp5rFzavU2HWfk4c27RvsIMHwW39DtgCQNgPamMv dzaCn+RKtSafW+6jjOfAHFdzSJ225rRGqPKHPV6T8XZd/T8uy4b+nTerHBCokMoC 8unJDM+yMuxmcyjcxw04mbGzBbDL8BL/O4BJiUrSPlpFpSJiQDgS2d9do2+RtD1f OUL/ihyvKn91lTUk9HCYB9RpYzVpdLdWSEw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEPiURKsiryl7B8uCq6nBg8P2qC9UbjEMpXV86S4knq0qIuJF0N259jMMhFQm0A2A +cg2Ra9lFDEkuy2u+POMlubQigOfJkEsTGqwixYSWtDZfyu7Lq2v+xMtJExfFfI5D2lEdG j/L07UrF+mTBoPfYSCMXrOE05rbzY/LoB/KnitviZfI7xPWGNarHvQp58IYLgF+3vAvwKn d+xJJthKSS//853iYwHbrJ82KUn8tGFK/1iTwY8TybkGFb7zGjvtarEGKpJ5koBcH3KQh3 2ZumiJTd/qO8qKAs8QEhGboQ+lr6J3w32V2kBsUVolYblYgx+v89h0FRNA8wJpSNSi2dBR P1oR/1lA5K3KtxoGfY2PlQLF1CwF9R8k1Bnqf0gmNQn+CiLT9njS5QlE+rfQFiRwnBmfGp 0JGLS7yU7T+NLaXgQ2t+EA5AZwfcN9GdawwgckXQfRhewIYiDMDUkVqfS9BakQssmnmu65 bApcDKUXTFYIU9zho/RoD5LOg/Z8YpP4aGFdZxzVeI1P1sfwfZ1Jv+a5UHYbreDi1dHfui RObNy3LmT2m+eUBp+//chJXUoYz4gQZiVO9Bd6NTOIFzwsNUYO4w/NC/94jqpFxQrMN3ZB LhrpzB3c+XkTy57OzNu89zOoiAsV047z3KY0lJ4uiMDP09DbwVQxffnYPtug X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Jul 2026 05:39:24 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 4046C890F557; Mon, 13 Jul 2026 11:39:21 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v3 01/22] host/rootfs: Mount filesystems before s6-rc-init In-Reply-To: <20260711-cgroups-v3-1-5cba61a20cba@gmail.com> References: <20260711-cgroups-v3-0-5cba61a20cba@gmail.com> <20260711-cgroups-v3-1-5cba61a20cba@gmail.com> Date: Mon, 13 Jul 2026 11:39:14 +0200 Message-ID: <8733xn1b5p.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: OX2IH5GXJHIZHFIEPXIDURSSI3MGGCGT X-Message-ID-Hash: OX2IH5GXJHIZHFIEPXIDURSSI3MGGCGT X-MailFrom: hi@alyssa.is 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; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development 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: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > cgroup-setup is written in Rust and uses the Rust standard library. > It also relies on cgroupfs being mounted at /sys/fs/cgroup. > Furthermore, it runs very, *very* early on, since it sets up the cgroups > in which s6-svscan and s6-supervise processes run. This allows setting > up sub-cgroups without having to worry about name collisions. > > While it would be possible to only mount the bare minimum necessary, > it's simpler to just mount everything before starting any services. > These mounts are all pseudo-filesystems or tmpfs instances, and none > have any dependencies. > > Signed-off-by: Demi Marie Obenour > --- > host/rootfs/image/etc/init | 11 ++++++++++- > host/rootfs/image/etc/s6-linux-init/scripts/rc.init | 9 +-------- > 2 files changed, 11 insertions(+), 9 deletions(-) > > diff --git a/host/rootfs/image/etc/init b/host/rootfs/image/etc/init > index db8a6d9c747e3d212c21b6c983c8f7e299822abe..8ec7859ab00e24007a93d4000= c8f34e353de50ae 100755 > --- a/host/rootfs/image/etc/init > +++ b/host/rootfs/image/etc/init > @@ -1,6 +1,15 @@ > #!/bin/execlineb -Ws0 > # SPDX-License-Identifier: EUPL-1.2+ > -# SPDX-FileCopyrightText: 2022 Alyssa Ross > +# SPDX-FileCopyrightText: 2020-2022, 2024 Alyssa Ross >=20=20 > /bin/setpriv --no-new-privs -- > + > +if { /bin/ln -s /proc/self/fd /dev } > +if { /bin/ln -s /proc/self/fd/0 /dev/stdin } > +if { /bin/ln -s /proc/self/fd/1 /dev/stdout } > +if { /bin/ln -s /proc/self/fd/2 /dev/stderr } I guess the idea is that the Rust standard library might want these? > + > +if { /bin/mount --make-shared / } > +if { /bin/mount -a --mkdir } > + > /bin/s6-linux-init -c /etc/s6-linux-init -s /run/param -- $@ > diff --git a/host/rootfs/image/etc/s6-linux-init/scripts/rc.init b/host/r= ootfs/image/etc/s6-linux-init/scripts/rc.init > index f638e373589884acb959c868462fdf532380a851..fba305c4e9cbb9f7535f11bb4= c06d8da8a34837b 100755 > --- a/host/rootfs/image/etc/s6-linux-init/scripts/rc.init > +++ b/host/rootfs/image/etc/s6-linux-init/scripts/rc.init > @@ -4,13 +4,6 @@ >=20=20 > if { s6-rc-init -c /etc/s6-rc /run/service } >=20=20 > -if { ln -s /proc/self/fd /dev } > -if { ln -s /proc/self/fd/0 /dev/stdin } > -if { ln -s /proc/self/fd/1 /dev/stdout } > -if { ln -s /proc/self/fd/2 /dev/stderr } > - > -if { mount --make-shared / } > -if { mount --make-shared /run } > -if { mount -a --mkdir } > +if { /bin/mount --make-shared /run } Presumably this does not actually suddenly need an absolute path. >=20=20 > s6-rc change ok-all > --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCalSyQgAKCRBbRZGEIw/w on0hAP9ks7AeupfjH0bpDIeYHqOQ6mA+4I23WkbLvSXnHy+N9QEA5qypfRJlmnvq EYXSIUHDO7kR3/OIql8n8iMXx2GsIAQ= =qoFa -----END PGP SIGNATURE----- --=-=-=--