mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-01-13 01:07:34 +00:00
e9717c4b7b
The original methods for reading and writing to GPU buffers naively assumed that the mappings returned by GBM were to the first byte in the buffer. In fact, the returned mapping is to the first pixel of the mapped rectangle. This would lead to segaults when the copy routine would breeze past the end of the mapping into segault territory. This change fixes the read and write algorithms and adds lots more guard rails in to prevent future undefined behavior (hopefully). TEST=boot kernel with VT and VIRTIO_GPU BUG=None Change-Id: Ia7c968b6dd274551b6d218e2f0b255af6e55bd35 Reviewed-on: https://chromium-review.googlesource.com/1102110 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |