Commit graph

20 commits

Author SHA1 Message Date
Treehugger Robot
e3db20857f Merge "Remove |ro.hardware.| prefix in KM VM sys property" into main 2024-11-23 00:14:01 +00:00
Alice Wang
d5c8b0bddf Remove |ro.hardware.| prefix in KM VM sys property
As per comment in aosp/3342288

Bug: 368502791
Test: launch_cvd --secure_hals=guest_keymint_trusty_insecure
Test: atest VtsAidlSharedSecretTargetTest
Change-Id: I71b6266fbd480c0ebe2a7946adadd88f38afb3e7
2024-11-20 08:32:40 +00:00
David Drysdale
91b97d7362 Merge "Declare support for v4 of KeyMint HAL" into main 2024-11-20 06:27:24 +00:00
David Drysdale
03a14f5284 Declare support for v4 of KeyMint HAL
Bug: 377744414
Bug: 369375199
Test: vts_treble_vintf_vendor_test
Change-Id: I1fc04834819cc9291d89a6ee6803cbc5d5d91437
2024-11-14 18:18:55 +00:00
Alice Wang
16693fae25 Rename system property to enable KeyMint VM
This allows us to regroup Widevine VM under the same trusty
group.

Bug: 368502791
Test: launch_cvd --secure_hals=guest_keymint_trusty_insecure
Test: atest VtsAidlSharedSecretTargetTest
Change-Id: Ica76a896e99f70a64af229bda68622a2ce0dea1f
2024-11-14 14:37:19 +00:00
David Drysdale
5969d69248 Declare previous version when using frozen HALs
The KeyMint HAL has been updated to v4, but frozen builds (e.g. 25Q1)
remain on the previous version.  The core AIDL version is handled
automatically, but we also have a package manager flag whose value
is (100 * HAL-version).  Use `RELEASE_AIDL_USE_UNFROZEN` to switch
between `required` configs for that.

Test: TreeHugger
Bug: 377808462
Bug: 378026324
Change-Id: Id042bee2a81e8563e1029ea7bb43452715e3edee
2024-11-11 19:17:20 +00:00
Alice Wang
5d5c732a3b Rename KM VM related system properties
To organize it under trusty and distinguish it from
Widevine VM.

Bug: 368502791
Test: launch_cvd --secure_hals=guest_keymint_trusty_insecure
Test: atest VtsAidlSharedSecretTargetTest
Change-Id: I48e43b9709e59b1cb9e1ba9113d5ef894469f485
2024-10-30 09:44:27 +00:00
Armelle Laine
2ea6ecf71d trusty: keymint: rename trusty_ipc_dev property
matching the naming convention for a system service property

Bug: 309007107
Test: launch_cvd --noresume --console=true \
      --extra_kernel_cmdline='androidboot.selinux=permissive' \
      --secure_hals=guest_keymint_trusty_insecure
Change-Id: I7c31f36dcac49d60469de44ce75c9b46a333786e
2024-09-19 14:25:45 +00:00
Arve Hjønnevåg
ced57af116 trusty: keymint/gatekeeper: Pass device name from init scripts
If the ro.hardware.trusty_ipc_dev.gatekeeper (respectively .keymint) property is set, pass it as the device name to the gatekeeper (respectively keymint) HALs.

Test: "setprop ro.hardware.trusty_ipc_dev VSOCK:2048:1" and restart HALs
Change-Id: I0947e532ac70ce1821cec49897f21ca10e1af03e
2024-09-10 04:00:09 +00:00
Alice Wang
d694b61591 [km] Include non-secure KM HAL with Trusty VM in /system_ext
Bug: 355194622
Test: launch_cvd --noresume --console=true \
     --extra_kernel_cmdline='androidboot.selinux=permissive' \
     --secure_hals=guest_keymint_trusty_insecure
Change-Id: I1ecdca049cfd6d33caf98f95d1260083bed2c155
2024-09-04 09:29:00 +00:00
Alice Wang
b9b2830c81 [km] Add a new rust binary for non-secure KeyMint host
The new binary sets non-secure RoT for keymint. The non-secure
version will be used on cuttlefish.

Bug: 355194622
Test: CF is gets booted with KeyMint TA in VM
Change-Id: Iff202c6d4bb70dabeb866b4f3fbc18c006bb219e
2024-08-29 11:25:27 +00:00
Arve Hjønnevåg
b4158e2599 trusty: keymint: Add commandline option to specify device name
Bug: 300338484
Test: VtsAidlKeyMintTargetTest (emulator subset)
Change-Id: Ibaa89dd0a3db65565101c0a37303c7155f999fb7
2024-07-31 08:21:53 +00:00
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
9d6d134e44 Merge "Add tipc fuzzer for KeyMint/Rust" into main 2023-10-19 08:31:09 +00:00
Matthew Maurer
cac69b6cb8 trusty: keymint: Statically link Rust deps
Vendor libraries can be linked dynamically now, but until more Rust
components are using it, static is more efficient.

Bug: 292062611
Test: TH
Change-Id: I3708f5fac1ace797b6233811adf3ec71218d5738
2023-07-27 22:36:28 +00:00
David Drysdale
880656af81 Add tipc fuzzer for KeyMint/Rust
Also update fuzz config for the KeyMint/C++ fuzzer

Test: trusty_keymint_fuzzer
Change-Id: Ic96c572ff6d154afefba280667c23e4e324d7751
2023-05-16 12:28:22 +01:00
Hasini Gunasinghe
3606cec3c0 Process large messages from TA
This CL adds the capability to the HAL to process reponses from the TA
that are larger than the capacity of the channel from HAL to TA.

Bug: 253501976
Test: with Trusty KM which has a smaller limit than some responses
Change-Id: I2fe056143f18718eb10bdd2d0559f3d171b14c96
2022-12-10 00:41:31 +00:00
Bob Badour
bbe272be62 [LSC] Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  trusty/keymint/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I70d332c63bd3a02e1d00a87579d1c16054167845
2022-12-08 05:36:04 -08:00
Hasini Gunasinghe
bf839f7b9f KeyMint HAL in Rust for Trusty
Implementation of the KeyMint HAL service based on the Rust reference
implementation.

This CL adds the code and associated metadata, but does not included it
into the overall build.

Bug: 197891150
Bug: 225036046
Test: VtsAidlKeyMintTargetTest
Change-Id: I9d95b9d8be645b6299a06d40973b38b66dcf3c07
2022-12-06 13:51:35 +00:00