mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Replace the use of unsafe struct casting with zerocopy trait derivation. This fixes a Rust UB where the struct was being filled with a slice of length greater than the size of the struct. As a compromise the guid handling was changed to handle the uuids as opaque bytes as they are mixed endian. This has no impact on the functionality as they are only used for comparison and has the positive impact of reducing some of the uuid handling complexity. Assisted-by: Claude:Opus-4.8 Signed-off-by: Rob Bradford <rbradford@meta.com>
43 lines
1.0 KiB
TOML
43 lines
1.0 KiB
TOML
[package]
|
|
authors = ["The Chromium OS Authors", "The Cloud Hypervisor Authors"]
|
|
edition.workspace = true
|
|
name = "block"
|
|
rust-version.workspace = true
|
|
version = "0.1.0"
|
|
|
|
[features]
|
|
default = []
|
|
io_uring = ["dep:io-uring"]
|
|
test-utils = []
|
|
|
|
[dependencies]
|
|
bitflags = { workspace = true }
|
|
byteorder = { workspace = true }
|
|
crc-any = "2.5.0"
|
|
flate2 = "1.1"
|
|
io-uring = { version = "0.7.12", optional = true }
|
|
libc = { workspace = true }
|
|
log = { workspace = true }
|
|
remain = "0.2.15"
|
|
serde = { workspace = true, features = ["derive"] }
|
|
smallvec = "1.15.1"
|
|
thiserror = { workspace = true }
|
|
uuid = { workspace = true, features = ["v4"] }
|
|
virtio-bindings = { workspace = true }
|
|
virtio-queue = { workspace = true }
|
|
vm-memory = { workspace = true, features = [
|
|
"backend-atomic",
|
|
"backend-bitmap",
|
|
"backend-mmap",
|
|
] }
|
|
vm-virtio = { path = "../vm-virtio" }
|
|
vmm-sys-util = { workspace = true }
|
|
zerocopy = { workspace = true, features = ["derive"] }
|
|
zstd = "0.13"
|
|
|
|
[dev-dependencies]
|
|
cfg-if = { workspace = true }
|
|
|
|
[lints]
|
|
workspace = true
|