Commit graph

5 commits

Author SHA1 Message Date
Charisee
0f42bd4a83 Update needed for Rust v1.77.0
error: field `0` is never read
  --> system/core/trusty/keymint/src/keymint_hal_main.rs:40:24
   |
40 | struct HalServiceError(String);
   |        --------------- ^^^^^^
   |        |
   |        field in this struct
   |
   = note: `HalServiceError` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
40 | struct HalServiceError(());
   |                        ~~


Bug: http://b/330185853
Test: ./test_compiler.py --prebuilt-path dist/rust-dev.tar.xz  --target aosp_cf_x86_64_phone --image

Change-Id: I79fb9019ba00900508aead414de80edd51f3fa2e
2024-04-02 04:53:01 +00:00
Jeff Vander Stoep
56aedd5551 Replace use of deprecated logging functions
This is needed to upgrade the android_logger crate from 0.12.0
to 0.13.3.

with_max_level provides the same functionality as with_min_level.
The renaming is admittedly confusing, but the new name is accurate
and it makes sense that they deprecated and then removed the
previously poorly named with_min_level.

See crate documentation [1] and code [2].

[1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level
[2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227

Bug: 322718401
Test: build and run CF with the change.
Test: m aosp_cf_x86_64_phone
Change-Id: Ib4fbd486267d30e74e886139846950b066848d43
2024-02-06 12:32:36 +01:00
David Drysdale
7171c676c0 Secretkeeper HAL: support large messages
The TIPC channel between HAL service and TA has a max message size of
around 4K. Cope with larger messages by using fragmentation and
reassembly for all messages.

Test: VtsSecretkeeperTargetTest
Change-Id: I18cc9a9f6e6b90ab66bc3bcf1972e1a5c5112c89
2024-01-23 10:24:01 +00:00
David Drysdale
36dfed9476 Secretkeeper: add Trusty fuzzers
Bug: 306364873
Test: initial short run of fuzzers on device, with aosp/2737933 reverted
Change-Id: I00ac6ab2678697d69a71aa3615c580c210772f20
2024-01-12 15:53:11 +00:00
David Drysdale
8e1c267cdf Initial Secretkeeper HAL service for Trusty
Disabled by default; enable with `export SECRETKEEPER_ENABLED=y` before
building.

Also needs the Secretkeeper TA to be present in Trusty; if the TA is
absent, the HAL service will (repeatedly) fail to connect.

Test: build, VtsSecretkeeperTargetTest
Bug: 306364873
Change-Id: I529013395d0e3afbff4a24b663088adce2a23805
2024-01-11 09:45:20 +00:00