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 6E83E4F2E; Sat, 06 Dec 2025 17:46:45 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id AAC454F2A; Sat, 06 Dec 2025 17:46:42 +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 AB0704EE3 for ; Sat, 06 Dec 2025 17:46:41 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 9C94F1400143; Sat, 6 Dec 2025 12:46:39 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Sat, 06 Dec 2025 12:46:39 -0500 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=fm3; t=1765043199; x=1765129599; bh=ZVQRZDD+5z 7myuCIX4xyWufxPt9f3s3JjnyzAT0babM=; b=C4Kz5WzOQjtMAFv4lk4fse7HJ9 09oymlZMly/lAfrfUB9Sc6ggg/OqMVVzEDC44D2BCPAugHhEfZSG2GZ5+JiUh4WU d2qMQPyXv/1I/hs3WAwmc+MB3jd1TfB3AOZNulu5RxjxddAPw+k4fIde5MaGIV0L Gfp9y4kx5E+WmV09pJY0j8Rl5W7vzmPxCG0ncqi/NCj7y6p/QU73V8V9vSBWyAnd 0aUPz5QXm4qDgC+9AvuHcANtCw+Od384/ngtnUai15Ukx2hQe7h0p8YHr2e56W0m 3QWNuwhHjgWy4LEIaQMDXeOnv5/pdFGXJgghK6oJfeTsrVDxYAcn6Dvkze5g== 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=fm1; t= 1765043199; x=1765129599; bh=ZVQRZDD+5z7myuCIX4xyWufxPt9f3s3Jjny zAT0babM=; b=klNzOqhcoObEmjQ1jgX3qdu+f4SF42Id9kAVtDcqyoP2dHbm1qz VFxLyw76chH/5o0tCvrsbIUl+8AsYZX0VzDgjda2x2xlw/IxCQm1+WwGKKK06WvR pDQUeIja4gE3KpbudjkxpXIKm/BjtJGgYfJANJ0rhvSCIs6Ha9/VuCQqj4a63Bmu xwhQaVPGWhpB2iEfl7uVRIodthsgopM4PaJj+keXxzWGkos0GYUhv195M76Gxh0B hWIeUmoIOeTLn4ONdIAgA401EmcXNLxFyXirzsXbCSrMul2n0R9Zy9Y7/ZKStgOC 1M5RZGV8aJm2LRISadsDSQ1/SC7KVNsZ8+w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepieduffeuie elgfetgfdttddtkeekheekgfehkedufeevteegfeeiffetvdetueevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegu vghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhessh hpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 6 Dec 2025 12:46:39 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 23DD549A6516; Sat, 06 Dec 2025 18:46:23 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v4 4/6] host/rootfs: Sandbox Cloud Hypervisor In-Reply-To: References: <20251203-sandbox-v4-0-71542a7dcf5c@gmail.com> <20251203-sandbox-v4-4-71542a7dcf5c@gmail.com> <87pl8u9uxy.fsf@alyssa.is> Date: Sat, 06 Dec 2025 18:46:21 +0100 Message-ID: <87ms3vjyfm.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: IIHUN3GZPBKZJ66BZ3QEP7QMVZFDGJOY X-Message-ID-Hash: IIHUN3GZPBKZJ66BZ3QEP7QMVZFDGJOY 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: Spectrum OS Development 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: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 12/4/25 09:35, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> It only needs access to a small number of resources. Unfortunately, it >>> needs access to /dev/vfio right now. This should be fixed by using file >>> descriptor passing instead. >>> >>> Furthermore, Cloud Hypervisor needs to be able to lock memory. Running >>> in a user namespace prevents it from having CAP_IPC_LOCK. Therefore, it >>> is necessary to increase RLIMIT_MLOCK before running Cloud Hypervisor. >>> >>> Signed-off-by: Demi Marie Obenour >>> --- >>> .../image/etc/udev/rules.d/99-spectrum.rules | 3 ++ >>> host/rootfs/image/usr/bin/run-vmm | 33 ++++++++++++++= +++++++- >>> 2 files changed, 35 insertions(+), 1 deletion(-) >>> >>> diff --git a/host/rootfs/image/etc/udev/rules.d/99-spectrum.rules b/hos= t/rootfs/image/etc/udev/rules.d/99-spectrum.rules >>> index 337bbe47dbbc6f3828722d8244f2689a39f3090f..de0f682aa40f8481dc3c25a= 90c695e2326536316 100644 >>> --- a/host/rootfs/image/etc/udev/rules.d/99-spectrum.rules >>> +++ b/host/rootfs/image/etc/udev/rules.d/99-spectrum.rules >>> @@ -3,3 +3,6 @@ >>>=20=20 >>> # systemd-udevd unsets PATH, so fix that. >>> ACTION!=3D"remove", ENV{PCI_CLASS}=3D=3D"2????", RUN+=3D"/usr/bin/env = PATH=3D/usr/bin /usr/libexec/net-add" >>> + >>> +# make /dev/kvm world-accessible >>> +KERNEL=3D=3D"kvm", MODE=3D"0666" >>> diff --git a/host/rootfs/image/usr/bin/run-vmm b/host/rootfs/image/usr/= bin/run-vmm >>> index ba8b59c2677408acdd01c2eda3cf2dd60992d881..24c3d607bfcf6fea6196b61= d2941141486d33fd6 100755 >>> --- a/host/rootfs/image/usr/bin/run-vmm >>> +++ b/host/rootfs/image/usr/bin/run-vmm >>> @@ -52,5 +52,36 @@ unexport ! >>> fdmove -c 3 0 >>> redirfd -r 0 /dev/null >>>=20=20 >>> +s6-softlimit -H -l 18446744073709551615 >>=20 >> The s6-softlimit documentation says that hard limits should generally >> only be set once, at boot, and that's what we now do for PipeWire in >> img/app. Is the idea here that it would be undesirable to incraese the >> hard limit for all processes, so only do it for Cloud Hypervisor? > > s6-softlimit -H also increases the soft limit. Allowing every > process on the system to lock an unlimited amount of memory doesn't > seem ideal. For interactive logins, soft limits will be set via PAM, > but Spectrum doesn't use PAM yet. This keeps the change localized, > rather than having to bump the hard limit everywhere and then undo > the change elsewhere. I wonder why the documentation says that, then. I suppose that's something I should take up with skarnet rather than you? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaTRr7QAKCRCZddwkt31p FW5WAP9DwqHuZcB9Yk0Hnf6zLzuQ/rv5ZqA78vFBBJffqyew5gD/fNxqikxeJdia MwK2bAYwGpO7GUceSZ3s2KL19luuPAY= =vy1D -----END PGP SIGNATURE----- --=-=-=--