Commit graph

10 commits

Author SHA1 Message Date
Daniel Verkamp
a360baa819 Cargo.toml: upgrade protobuf 2.x -> 3.x
system_api bindings have been regenerated with protobuf 3.2; this should
be okay to land before the full ChromeOS system_api migration, since
crosvm always uses its own copy of the bindings rather than the ones
provided by the dev-rust/system_api package.

The protoc-rust crate is replaced with protobuf_codegen in 3.x.

BUG=b:277243607
BUG=b:279834784
TEST=tools/dev_container tools/presubmit

Change-Id: I6aad45ded2639d7506a7238800584bebab196455
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4405309
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
2023-04-28 19:32:01 +00:00
Vikram Auradkar
cfcd16f94c kiwi: clean anti_tamper and metrics related code
BUG=b:260601120
TEST=NONE

Change-Id: If356c731ea9b03b6266f1263b660bc75db452511
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4133828
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-01-04 00:08:27 +00:00
Daniel Verkamp
ac0fc378a3 Fix remaining Chrome/Chromium OS instances
These should be written as ChromeOS and ChromiumOS (without the space)
to match the updated branding. The copyright headers were already
migrated to the new style (https://crrev.com/c/3894243), but there were
some more instances left over.

BUG=None
TEST=tools/cargo-doc

Change-Id: I8c76aea2eb33b2e370ab71ee9b5cc0a4cfd00585
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4129934
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-01-03 22:14:30 +00:00
Noah Gold
ea5ffed771 metrics: migrate to proto_build_tools.
BUG=b:256951877
TEST=builds

Change-Id: Iea6ab37489e87b1c8ca3c33fbf4a0d974a9b59ca
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4021591
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2022-11-12 01:02:23 +00:00
Pujun Lun
dd2c0a932a crosvm: move enum ProcessType to win_util.
This is to keep consistency with Windows downstream code.
The conversion from ProcessType to EmulatorProcessType is moved to
the metrics crate as it is only used for generating metrics.

BUG=b:213146388
TEST=presubmit

Change-Id: Ia62f76835a1f162dd8bbc9e53fd671968c368473
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3908370
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Pujun Lun <lunpujun@google.com>
2022-09-21 19:28:49 +00:00
Dennis Kempin
7a4d4d6b2a health-check: Add check for newline at ends of files
Fixes a couple of files that were missing them.

BUG=b:242605601
TEST=./tools/health-check --fix

Change-Id: I620d6a939cb824e014002152584aacfc5dfdf7e8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3835648
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-08-18 00:17:04 +00:00
Daniel Verkamp
19fc097eb8 crosvm: replace lazy_static with once_cell
We depend on both lazy_static and once_cell, which do basically the same
thing.

The once_cell crate has a few advantages:
- once_cell is on track to be included into libstd.
  (https://github.com/rust-lang/rust/issues/74465)
- once_cell doesn't require macro magic.

Replace the uses of lazy_static with their once_cell equivalents so we
don't need to pull in both crates.

BUG=b:236191006
TEST=tools/presubmit --all
TEST=tools/run_tests --target=host --arch=win64 --build-only
TEST=cargo test --features=plugin

Change-Id: I7cabcd837ef4878e8e8ae635bb4f235a58e4cae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3707624
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
2022-06-21 23:40:55 +00:00
Michael Hoyle
c29271e168 Revert "Revert "metrics: Add metrics crate.""
This reverts commit 55a5c8d8f9.

In order to accommodate the removal of the
UnixSeqPacket+CloseNotifier change, I updated the controller.rs
to reference platform-specific internal implementations.

On Windows, CloseNotifier is used to detect closed Tubes.
On Linux, we rely on PollContext returning because the socket fd
    is hung up.

Some minor adjustmets to the code were made just to allow as
litte duplication as possible.

In the end, very little logic has changed from the original CL,
it's just moved around.

TL;DR:
This fixes the downstream regression by removing its dependency
on the breaking changes to base.

BUG=b:232316549
FIXED=b:232316549
TEST=Crosvm tests

Change-Id: I946d5096f7a312538c3c694950697fab1be7f0ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3661257
Commit-Queue: Michael Hoyle <mikehoyle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-25 04:45:13 +00:00
Shao-Chuan Lee
55a5c8d8f9 Revert "metrics: Add metrics crate."
This reverts commit 4c2017c757.

Reason for revert: dependency crrev.com/c/3622798 caused regression

Original change's description:
> metrics: Add metrics crate.
>
> This crate is effectively a collection of stubs in this repo,
> but will allow a downstream repo to implement those stubs.
>
> BUG=b:213152497
> FIXED=b:213152497
> TEST=build + kokoro
>
> Change-Id: I3c544644ec3d7917f9ebb2e8621042c35b556db8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3622799
> Reviewed-by: Noah Gold <nkgold@google.com>
> Commit-Queue: Michael Hoyle <mikehoyle@google.com>
> Tested-by: kokoro <noreply+kokoro@google.com>

BUG=b:213152497,b:232316549
TEST=CtsAccessibilityServiceTestCases

Change-Id: Idd636d7d34e68977fffc1f6c0a89924eb7be5d54
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3641218
Auto-Submit: Shao-Chuan Lee <shaochuan@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Michael Hoyle <mikehoyle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-05-12 16:31:51 +00:00
Michael Hoyle
4c2017c757 metrics: Add metrics crate.
This crate is effectively a collection of stubs in this repo,
but will allow a downstream repo to implement those stubs.

BUG=b:213152497
FIXED=b:213152497
TEST=build + kokoro

Change-Id: I3c544644ec3d7917f9ebb2e8621042c35b556db8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3622799
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Michael Hoyle <mikehoyle@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-10 03:52:13 +00:00