mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
de06f15777
PCI BARs have a minimum size based on the number of bits reserved for the type bitfield, which is stored in the low bits of each BAR. The minimum size is derived from the number of bits used to store the type: 2 bits (4-byte minimum) for I/O bars and 4 bits (16-byte minimum) for memory BARs. Previously, since the minimum size was not enforced, callers could create invalid configurations that would allow the guest to overwrite the type bits of the BARs. Luckily, this only happened in the unit tests, which are fixed in this change. BUG=None TEST=cargo test -p devices Change-Id: I30d65485254b49655c9ad7bec51e43533fe2c01d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2300692 Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |