mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-12-27 05:43:43 +00:00
0584fe9fb2
Not all types are safe to read from guest memory. Any type with a reference or pointer will be initialized to random bits that don't refer to a valid address. This can cause dangling pointer and general unsafe behavior. To fix this, limit types that can be read with read_obj to those that implement the unsafe trait `DataInit`. Provide implementations of `DataInit` for intrinsic types that are obviously safe to initialize with random data. Implement the needed traits for bootparam types as they are read from the kernel image directly. Change-Id: I1040f5bc1b2fc4c58c87d8a2ce3f618edcf6f9b1 Signed-off-by: Dylan Reid <dgreid@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/540750 Reviewed-by: Zach Reizner <zachr@chromium.org>
12 lines
261 B
TOML
12 lines
261 B
TOML
[package]
|
|
name = "x86_64"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
|
|
[dependencies]
|
|
data_model = { path = "../data_model" }
|
|
kvm_sys = { path = "../kvm_sys" }
|
|
kvm = { path = "../kvm" }
|
|
sys_util = { path = "../sys_util" }
|
|
libc = "*"
|
|
byteorder = "*"
|