crosvm/io_uring
Daniel Verkamp 4c64fa7c6f io_uring: allow alignment-changing casts of mmap
uring.rs wraps the kernel io_uring interfaces that provide C-style raw
pointers, which requires casting a *u8 into other types with stricter
alignment requirements.  All of these casts are based on the base mmap()
pointer (which is always page aligned) or offsets within an mmap
provided by the kernel, so we can assume they are safe to cast to the
relevant more-aligned types.

Fixes clippy warnings of the form:

  casting from `*mut u8` to a more-strictly-aligned pointer (`*const
  std::sync::atomic::AtomicU32`) (1 < 4 bytes)

BUG=None
TEST=bin/clippy

Change-Id: Ibef32bb8529d34ece79f089992ad8bd880c5030b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2253068
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2020-06-22 21:10:14 +00:00
..
src io_uring: allow alignment-changing casts of mmap 2020-06-22 21:10:14 +00:00
Cargo.toml Add io_uring interfaces 2020-04-05 21:32:20 +00:00