mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
50f9591b6a
Passing an open FD is necessary to avoid racing for vsock context IDs: On Borg, we first want to generate a random, unused CID and pass this to crosvm. This requires us to open `/dev/vhost-vsock` and call the `VHOST_VSOCK_SET_GUEST_CID` ioctl on it. Closing the device and simply assing its path to crovm opens up a time window where an overlapping VM creation request may set a different CID on the device. BUG=none TEST=tools/presubmit --quick Change-Id: If053e26ba93ab357b06e8cf07798679c8ad06c9e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3263933 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Christian Blichmann <cblichmann@google.com> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |