crosvm/io_uring
Dylan Reid e187df2a5e io_uring: Take Vecs or iterators of iovecs
The pointer passed to the kernel for the iovecs must remain valid until
the operation completes. This is true even if the kernel copies the sqe
containing the pointer, that isn't a deep copy. If the iovecs are freed
before the kernel actually processes the op, it will fail with a bad
address error.

Move the responsibility for maintaining the list in memory from the
caller to io_uring itself. This mean io_uring must allocate.  Taking
iterators for IoSlice/IoSliceMut, means that the caller doesn't need to
allocate as well if there isn't a Vec already allocated.

Change-Id: I63a009d8ab543c8bac4132809fb851536d4ad82c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2227082
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
2020-06-05 17:29:51 +00:00
..
src io_uring: Take Vecs or iterators of iovecs 2020-06-05 17:29:51 +00:00
Cargo.toml Add io_uring interfaces 2020-04-05 21:32:20 +00:00