mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
Don't use /proc/sys/fs/file-max when setting the max open file limit for the virtio-fs device. This will fail when the value is larger than the hard limit set for the crosvm process, unless it also has CAP_SYS_ADMIN in the initial namespace. Instead, just use the hard limit as returned by `prlimit64`. Increasing the soft limit up to the hard limit is allowed even for completely unprivileged processes. It is up to the process that spawned crosvm to ensure that the hard limit is high enough that the virtio-fs server will not run out of fds. BUG=b:142344095 TEST=Start a termina VM with a virtio-fs device after applying CL:1939193 Change-Id: I4fb4c33ffe6378ed3109fddcb0fc2bf3da850252 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1957767 Tested-by: Chirantan Ekbote <chirantan@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Auto-Submit: Chirantan Ekbote <chirantan@chromium.org> Commit-Queue: Stephen Barber <smbarber@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> |
||
---|---|---|
.. | ||
plugin | ||
argument.rs | ||
crosvm.rs | ||
linux.rs | ||
main.rs | ||
panic_hook.rs |