crosvm/common
Daniel Verkamp d3c28cc3c1 data_model: windows: panic if IoBuf len is too large
The Windows version of IoBuf uses the WSABUF structure, which represents
len as a 32-bit value. Previously, larger len values would be silently
truncated; this change makes those conversions using try_into() instead.
We have no easy way to report failure of this usize -> u32 conversion,
so for now, just unwrap() to cause a panic if the length ever overflows
so it will at least produce a crash report and be noticed.

A possible future enhancement could be to make all relevant IoBuf and
IoBufMut functions return Result<...> so the error could be propagated
back to the caller.

BUG=None
TEST=tools/dev_container tools/presubmit

Change-Id: I79270a7e8af01827ef0d1bafaa98c5d7f4b53b73
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4567110
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-05-25 23:26:57 +00:00
..
audio_streams clippy: Disallow new_without_default 2023-05-22 21:14:06 +00:00
balloon_control balloon: return balloon_actual with wss 2023-04-17 21:32:23 +00:00
data_model data_model: windows: panic if IoBuf len is too large 2023-05-25 23:26:57 +00:00
p9 fuzz: Move p9/fuzz into crosvm-fuzz 2023-05-16 20:43:37 +00:00
sync Fix remaining Chrome/Chromium OS instances 2023-01-03 22:14:30 +00:00
chromeos_warning.md Add version pin warning to common/ 2022-04-15 19:51:35 +00:00
README.md docs: Use mdformat to format markdown files 2022-01-27 21:29:11 +00:00

Crosvm General Purpose Libraries

The crates in this folder are general purpose libraries used by other projects in ChromeOS as well.

To make them accessible independendly of crosvm, each of these crates is excluded from the crosvm workspace.

List of libraries

  • cros-fuzz: Support crate for fuzzing rust code in ChromeOS
  • p9: Server implementation of the 9p file system protocol