mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
b5a9833d97
This implements the equivalent logic on crosvm as UFFD_FEATURE_EVENT_FORK. When each device process forks, the ProxyDevice creates userfaultfd and send it to the monitor process by SwapController::on_process_forked(). Crosvm does not have any child processes which may access the guest memory except device processes as of now. Crosvm forks virgl_render_server, but the mmap is not preserved in the process on execve(2) since it is a different binary. Also no device process forks grandchild processes according to the seccomp policy. We actually can't use UFFD_FEATURE_EVENT_FORK because the feature does not support non-root user namespace (go/uffd-fork-user-ns) and ARCVM runs in a non-root user namespace. This also adds syscalls to seccomp policies for devices to allow the processes to create and setup a userfaultfd. BUG=b:266641923 TEST=manually tested Change-Id: Ide3088e1e95ae3c8259e3f4324124b3376e760b7 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4194228 Reviewed-by: David Stevens <stevensd@chromium.org> Commit-Queue: Shin Kawamura <kawasin@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Dennis Kempin <denniskempin@google.com>
35 lines
966 B
TOML
35 lines
966 B
TOML
[package]
|
|
name = "aarch64"
|
|
version = "0.1.0"
|
|
authors = ["The ChromiumOS Authors"]
|
|
edition = "2021"
|
|
|
|
[features]
|
|
gdb = ["gdbstub", "gdbstub_arch", "arch/gdb", "hypervisor/gdb"]
|
|
|
|
[dependencies]
|
|
arch = { path = "../arch" }
|
|
cros_fdt = { path = "../cros_fdt" }
|
|
data_model = { path = "../common/data_model" }
|
|
devices = { path = "../devices" }
|
|
gdbstub = { version = "0.6.3", optional = true }
|
|
gdbstub_arch = { version = "0.2.4", optional = true }
|
|
hypervisor = { path = "../hypervisor" }
|
|
kernel_cmdline = { path = "../kernel_cmdline" }
|
|
kernel_loader = { path = "../kernel_loader" }
|
|
libc = "*"
|
|
memoffset = "0.6"
|
|
rand = "0.8"
|
|
remain = "*"
|
|
resources = { path = "../resources" }
|
|
sync = { path = "../common/sync" }
|
|
base = { path = "../base" }
|
|
thiserror = "*"
|
|
vm_control = { path = "../vm_control" }
|
|
vm_memory = { path = "../vm_memory" }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
minijail = "*"
|
|
|
|
[target.'cfg(target_os="linux")'.dependencies]
|
|
swap = { path = "../swap", optional = true }
|