patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Demi Marie Obenour <demiobenour@gmail.com>
To: Alyssa Ross <hi@alyssa.is>
Cc: Spectrum OS Development <devel@spectrum-os.org>
Subject: Re: [PATCH v4 4/6] host/rootfs: Sandbox Cloud Hypervisor
Date: Sat, 6 Dec 2025 12:47:24 -0500	[thread overview]
Message-ID: <0c98ad55-9e7b-4fbe-8e3b-4050037e1e35@gmail.com> (raw)
In-Reply-To: <87ms3vjyfm.fsf@alyssa.is>


[-- Attachment #1.1.1: Type: text/plain, Size: 2903 bytes --]

On 12/6/25 12:46, Alyssa Ross wrote:
> Demi Marie Obenour <demiobenour@gmail.com> writes:
> 
>> On 12/4/25 09:35, Alyssa Ross wrote:
>>> Demi Marie Obenour <demiobenour@gmail.com> writes:
>>>
>>>> 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 <demiobenour@gmail.com>
>>>> ---
>>>>  .../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/host/rootfs/image/etc/udev/rules.d/99-spectrum.rules
>>>> index 337bbe47dbbc6f3828722d8244f2689a39f3090f..de0f682aa40f8481dc3c25a90c695e2326536316 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 @@
>>>>  
>>>>  # systemd-udevd unsets PATH, so fix that.
>>>>  ACTION!="remove", ENV{PCI_CLASS}=="2????", RUN+="/usr/bin/env PATH=/usr/bin /usr/libexec/net-add"
>>>> +
>>>> +# make /dev/kvm world-accessible
>>>> +KERNEL=="kvm", MODE="0666"
>>>> diff --git a/host/rootfs/image/usr/bin/run-vmm b/host/rootfs/image/usr/bin/run-vmm
>>>> index ba8b59c2677408acdd01c2eda3cf2dd60992d881..24c3d607bfcf6fea6196b61d2941141486d33fd6 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
>>>>  
>>>> +s6-softlimit -H -l 18446744073709551615
>>>
>>> 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?

I think so.  I suspect it's subjective but am not sure.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-12-06 17:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-29 22:31 [PATCH] host/rootfs: Sandbox crosvm Demi Marie Obenour
2025-12-02  3:46 ` [PATCH v2 0/4] Partially sandbox Cloud Hypervisor, crosvm, virtiofsd, and the router Demi Marie Obenour
2025-12-02  3:46   ` [PATCH v2 1/4] host/rootfs: Sandbox crosvm Demi Marie Obenour
2025-12-03 12:43     ` Alyssa Ross
2025-12-03 12:48       ` Demi Marie Obenour
2025-12-03 13:09         ` Alyssa Ross
2025-12-04 13:28         ` Alyssa Ross
2025-12-02  3:46   ` [PATCH v2 2/4] host/rootfs: Sandbox router Demi Marie Obenour
2025-12-02  3:46   ` [PATCH v2 3/4] host/rootfs: Sandbox virtiofsd Demi Marie Obenour
2025-12-02  3:46   ` [PATCH v2 4/4] host/rootfs: Sandbox Cloud Hypervisor Demi Marie Obenour
2025-12-02 13:14   ` [PATCH v2 0/4] Partially sandbox Cloud Hypervisor, crosvm, virtiofsd, and the router Alyssa Ross
2025-12-03 15:54   ` [PATCH v3 0/5] " Demi Marie Obenour
2025-12-03 15:54     ` [PATCH v3 1/5] host/rootfs: Sandbox crosvm Demi Marie Obenour
2025-12-03 15:54     ` [PATCH v3 2/5] host/rootfs: Sandbox router Demi Marie Obenour
2025-12-03 16:06       ` Yureka
2025-12-03 16:11         ` Alyssa Ross
2025-12-09 11:23           ` Yureka
2025-12-03 15:54     ` [PATCH v3 3/5] host/rootfs: Unshare a few more namespaces in virtiofsd Demi Marie Obenour
2025-12-03 15:54     ` [PATCH v3 4/5] host/rootfs: Sandbox Cloud Hypervisor Demi Marie Obenour
2025-12-03 15:54     ` [PATCH v3 5/5] host/rootfs: Try to protect the portal and dbus daemon Demi Marie Obenour
2025-12-04  2:20     ` [PATCH v4 0/6] Partially sandbox Cloud Hypervisor, crosvm, virtiofsd, and the router Demi Marie Obenour
2025-12-04  2:20       ` [PATCH v4 1/6] host/rootfs: Sandbox crosvm Demi Marie Obenour
2025-12-04 13:03         ` Alyssa Ross
2025-12-04  2:20       ` [PATCH v4 2/6] host/rootfs: Sandbox router Demi Marie Obenour
2025-12-04 13:47         ` Alyssa Ross
2025-12-04  2:20       ` [PATCH v4 3/6] host/rootfs: Unshare a few more namespaces in virtiofsd Demi Marie Obenour
2025-12-04 14:03         ` Alyssa Ross
2025-12-04  2:20       ` [PATCH v4 4/6] host/rootfs: Sandbox Cloud Hypervisor Demi Marie Obenour
2025-12-04 14:35         ` Alyssa Ross
2025-12-06 17:35           ` Demi Marie Obenour
2025-12-06 17:46             ` Alyssa Ross
2025-12-06 17:47               ` Demi Marie Obenour [this message]
2025-12-06 17:56                 ` Alyssa Ross
2025-12-04  2:20       ` [PATCH v4 5/6] host/rootfs: Try to protect the portal and dbus daemon Demi Marie Obenour
2025-12-04 14:23         ` Alyssa Ross
2025-12-04  2:20       ` [PATCH v4 6/6] host/rootfs: "Sandbox" Weston Demi Marie Obenour
2025-12-04 14:47         ` Alyssa Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c98ad55-9e7b-4fbe-8e3b-4050037e1e35@gmail.com \
    --to=demiobenour@gmail.com \
    --cc=devel@spectrum-os.org \
    --cc=hi@alyssa.is \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).