Commit graph

410 commits

Author SHA1 Message Date
Yurii Shutkin
f75464d65e acvp: handle flush commond in modulewrapper as stated in BoringSSL.
Change-Id: Ife655f0764851cf2d9677abd507daec3f531031e
Bug: 287626912
Test: ACVP test
2023-10-09 15:37:29 +02:00
Elliott Hughes
716ff7b55a s/master/main/
Test: treehugger
Change-Id: Iabb23436d92686b934f2f2609217714b64ae75de
2023-10-04 23:31:09 +00:00
Snehal
6a12d23eab Remove ambgiuity in format specifier
Bug: 302163991

Test: m trusty-coverage-controller

Change-Id: I26318eeb4a6770bd01d3c677ca3cf5c76ce33fa0
2023-09-27 12:29:07 +00:00
Ryan Prichard
532a608f58 Merge changes I7790dde8,I065907a5,Id2e82024 into main
* changes:
  Add missing <assert.h> include
  Add missing <functional> and <vector> includes
  snapuserd_test: don't discard result of std::async
2023-09-22 19:42:45 +00:00
Ryan Prichard
87c90e7b65 Add missing <assert.h> include
Bug: 175635923
Test: m MODULES-IN-system-core-trusty
Change-Id: I7790dde8eba948cf95cb14dd2b436c3f6f88765a
2023-09-21 19:44:47 -07:00
Dan Shi
43c87b3291 Remove unnecessary keyword setting
These 2 tests can run on aosp cf.

Bug: 300519349
Test: atest presubmit check
Change-Id: I8ee41c2abe464be2c2ee4537de5edf86308183aa
2023-09-20 13:26:18 -07:00
Dan Shi
19224ed589 Merge "Move CF only tests to CF test mapping suite" into main 2023-09-20 20:20:35 +00:00
Dan Shi
a95ed0aeac Move CF only tests to CF test mapping suite
This change doesn't modify presubmit coverage, the tests will still
run in the lab as test mapping suite, just on a different ATP test
config that dedicated to tests can only run on CF (not aosp_cf), on
git_main branch.

Bug: 300519349
Test: atest presubmit check
Change-Id: Ib179c034dc58f8d8a763d374af0d103baf51343b
2023-09-20 18:27:43 +00:00
Tomasz Wasilczyk
2b1a0599c4 Don't depend on String8 cast to C string
Bug: 295394788
Test: m checkbuild
Change-Id: I5b86ae56250d409a23ab3f2bc72b725bcf6ab23e
2023-09-20 15:11:54 +00:00
Snehal
6e074fc31e Add UUIDs to profraw filenames
Bug: 295866435

Change-Id: Ie9390f412c70202d1583e29ac83c30778ae02f70
2023-08-18 09:43:15 +00:00
Snehal Koukuntla
7cc9edd55c Merge "Change name to trusty-coverage-controller" into main 2023-08-16 09:15:09 +00:00
Snehal
b702fddd2e Change name to trusty-coverage-controller
Test: builds and passes tests

Bug: None

Change-Id: I89eec23312f79f4da43c491ce58aa4f246c7ab34
2023-08-16 09:14:32 +00:00
Treehugger Robot
49dc9d1233 Merge "Add mikemcternan@ to OWNERS" into main 2023-08-15 16:21:57 +00:00
David Drysdale
cedcb4cd92 KeyMint HAL: process destroyAttestationIds
Bugs: 283049310
Test: VtsAidlKeyMintTargetTest using disabled test
Change-Id: I545511a7a701faf8e82dff9c169c3738f2c30e6d
2023-08-09 11:32:52 +01:00
Snehal
7728c6c998 Add mikemcternan@ to OWNERS
Change-Id: Ia414e191eab2b2e3139b94fa8c94ea54f4fbf308
2023-08-07 18:32:33 +00:00
Snehal Koukuntla
6ac2c1693d Merge changes from topic "coverage-build" into main
* changes:
  Add Coverage controller
  Coverage library on the NS side for the coverage controller
2023-08-07 10:53:44 +00:00
Snehal
806e70bb94 Add Coverage controller
Bug: 289523068

Change-Id: I5b36c274acc7da4e2d6b9cf91409a7b1af5f0d34
2023-08-04 08:54:52 +00:00
Snehal
ed34b6e232 Coverage library on the NS side for the coverage controller
Bug: 289520358

Change-Id: I6c2c0e5db9e8d9a0edec93d2fb123d185c7c4416
2023-08-04 08:54:32 +00:00
Treehugger Robot
545f3e0d35 Merge "trusty: keymint: Statically link Rust deps" into main 2023-07-27 23:29:48 +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
Treehugger Robot
406d43397c Merge "Add safety comments." into main 2023-07-25 07:00:16 +00:00
Stephen Crane
b05b870671 storageproxyd: Start only a single binder thread
We only need a single binder thread to receive notifications, so we
should set the thread pool max to 0 rather than 1. startThreadPool()
starts one thread + the max count.

Test: m storageproxyd
Bug: 281951047
Fixes: 292030372
Change-Id: I53a90eaa2aa69469fd3a00b6da0d7061318c8ba9
2023-07-21 19:23:45 +00:00
Andrew Walbran
f580fe5799 Add safety comments.
These will soon be required by a lint.

Bug: 290018030
Test: m rust
Change-Id: I0b25bcaa18d167fb9c2d63e637833d4935dc8ff4
2023-07-21 19:13:48 +01:00
Stephen Crane
fb92cd3c22 storageproxyd: Start binder thread pool
The Trusty storage proxy requires that the suspend service is started to
acquire a wakelock for UFS RPMB operations. Without the binder thread
pool running, starting this service results in at least a 1s polling
delay. This change ensures that we start the thread pool before handling
any RPMB operations, so acquiring the wakelock will complete as soon as
the service is ready without needing to poll once per second.

Test: m storageproxyd
Test: Artificially delay suspend_service to check if we poll
Bug: 281951047
Change-Id: I1a4cdd48d57201b0cf9c24523d22e5bdbcea376a
2023-07-19 18:37:52 +00:00
David Drysdale
f009f927d0 Merge "Set IMEI in provisioning helper" 2023-05-18 06:24:32 +00:00
David Drysdale
e556021b52 Set IMEI in provisioning helper
Borrow the code from AttestKeyTest.cpp (in KeyMint VTS) for determining
the devices IMEI value(s), and use that as default value.

Also update to use the newer provisioning message if the second IMEI is
set.

Test: provision a test device
Change-Id: Ie8e183dc50ac9107c2c2c2966c591e8b6022fd20
2023-05-17 18:12:00 +01:00
Mike McTernan
4066926374 confirmationui:fuzzer: update contact details
Bug: None
Test: make trusty_confirmationui_tipc_fuzzer
Change-Id: Ie81bf916c41498abc226389f63b22b57da55d446
2023-05-16 09:05:29 +01:00
Armelle Laine
8185610aa4 trusty: Add trusty stats test
Test an Android Daemon consuming IStats.aidl vendor atoms
from Trusty.

Test: /data/nativetest64/vendor/trusty_stats_test/trusty_stats_test
Bug: 259517277
Change-Id: I7486db5494a8fd4a995ec8a1a865e6e5fa515dfc
2023-03-20 21:08:24 +00:00
Andrei Homescu
2de07e82f2 trusty: Add IStatsSetter interface
Add android.trusty.stats.nw.setter.IStatsSetter interface
for sending an IStats interface from Android to Trusty.

Bug: 259517277
Test: /data/nativetest64/vendor/trusty_stats_test/trusty_stats_test
Change-Id: Ie3976cdf069dd47b51477a70eb597c76de79f522
2023-03-17 20:14:55 +00:00
Tri Vo
3aa6c71d43 Merge "Remove RemoteProvisioner" 2023-03-14 03:54:17 +00:00
Tri Vo
ee45e23798 Remove RemoteProvisioner
RemoteProvisioner is deprecated in favor of RKPD

Bug: 273325840
Test: m
Change-Id: I71abe9e0173ef399f9bca65814995aa7e66f1ebe
2023-03-13 13:55:32 -07:00
Max Bires
fea7f85a4e Add RKPD unit tests to trusty keymaster changes.
This ensures that full integration testing is done when changes are made
to the KM/IRPC client HAL service for Trusty.

Test: The tests are run.
Change-Id: Id22bbac119f76653a5b2338e97f28032822741f0
2023-03-08 17:40:18 -08:00
Donnie Pollitz
dedd899baa Add KM_SET_ATTESTATION_IDS_KM3 to enum list
* This command is needed to support provisioning KeyMintv3 attestation IDs

Bug: 265381212
Test: Ran KM Vts
Change-Id: I9b9bf3753b90c58096fa85a4e7303b47eaafe31f
Signed-off-by: Donnie Pollitz <donpollitz@google.com>
2023-02-16 10:59:47 +01:00
Treehugger Robot
368a908334 Merge "Fastboot: Add new TEXT message to protocol to handle long lines." 2023-02-15 11:49:24 +00:00
Raphael Herouart
99097cc020 Fastboot: Add new TEXT message to protocol to handle long lines.
Trusty Benchmarks need to be evaluated in ABL which is much more
controlled than linux. However fastboot prints evry atomic message from
trusty/abl on its own line starting with "(bootloader)"

Bug: 263454481
Test: - "fastboot oem trusty runtest trusty.hwrng.bench"
Change-Id: I99847a8cc54457c8ec809e219736325dce0ac891
2023-02-14 19:58:42 +00:00
Treehugger Robot
d14a7551d5 Merge "Convert Gatekeeper from HIDL to AIDL" 2023-02-14 17:48:17 +00:00
David Drysdale
d0149e8e9a Convert Gatekeeper from HIDL to AIDL
Replaced HIDL spec implementation with AIDL spec in gatekeeper
module. Based on the changes in aosp/2161796.

Bug: 268342724
Test: VtsHalGatekeeperTargetTest, CtsVerifier
Change-Id: Ic322e5c5a7d0577df28410a546cbad88549158bc
2023-02-08 18:41:56 +00:00
Stephen Crane
0255766d6b storageproxyd: Add watchdog to log stuck requests
Adds a background watchdog thread to the Trusty storageproxy to monitor
and log any requests that are delayed for too long. This is intended to
assist in recognizing and debugging any sources of hangs related to
servicing Trusty storage requests in Android.

Test: Add sleep() and run trusty storage tests
Bug: 266595872
Change-Id: I98dfaff0dff04f97d5c657ee131e746f63b39739
2023-02-06 21:39:19 +00:00
Dai Li
17ac2b6061 Add libtrusty to recovery image
Make libtrusty available to boot control

Bug: 232277507
Change-Id: Ie6a83fd37689c09c5f0542fa9bbead6c5326f309
2023-01-26 02:45:36 +00:00
Seth Moore
ac5638bdbb Remove RemoteProvsioner tests from presubmit
RemoteProvsioner is deprecated, and already disabled/non-functional
on some builds. Turn off the tests because they are causing spurious
presubmit failures.

Test: n/a
Bug: 266181756
Change-Id: I9b8d3e742ef2b2448a798b1e96b6f3e02695e2be
2023-01-25 08:14:16 -08:00
David Drysdale
2ac6aed466 Helper for setting attestation IDs
Useful for testing on unprovisioned devices, so that IDs match those
expected by the VTS tests.

Note that any attestation involving the values set as attestation IDs
will only be signed by a fake key, and so will not be a valid
attestation of anything.

Bug: 258602662
Test: VtsAidlKeyMintTargetTest --gtest_filter="*NewKeyGenerationTest.EcdsaAttestationIdTags*default"
Change-Id: Ic31e4f28ec3a2830ae12a794b2fa063944df2614
2023-01-10 06:30:06 +00:00
David Drysdale
bf6ac3534e Merge "Allow selection of Trusty KeyMint HAL implementation" 2023-01-05 06:23:29 +00:00
Hasini Gunasinghe
6dfeccf9c8 Merge "Process large messages from TA" 2022-12-14 16:33:24 +00:00
Eran Messeri
33937f432c Merge "Bump the KeyMint version to v3" 2022-12-13 17:58:17 +00: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
Jay Monkman
2ad61bf01b storageproxyd: Added support for getting max size of file
This handles the STORAGE_FILE_GET_MAX_SIZE. The new behavior will
return a max size of 0x10000000000 (former default value in Trusty)
for a regular file and the partition size for a block device.

Test: N/A
Bug: 247003431
Change-Id: Ib8b8504b63496d64487cf2f96a1c0758bfafdd97
Signed-off-by: Jay Monkman <jtmjtmjtmjtmjtmjtmjtm@gmail.com>
2022-12-08 20:53:08 -06: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
Eran Messeri
b8c8f2df6e Bump the KeyMint version to v3
To match what the implementation returns.

Bug: 244732345
Test: atest android.keystore.cts.DeviceOwnerKeyManagementTest
Change-Id: I48b4c6694d938d3d61a1524319e1d8b1da19e0b5
2022-12-07 13:05:57 +00:00
David Drysdale
719d4a8bde Allow selection of Trusty KeyMint HAL implementation
By default, the existing C++ implementation of KeyMint will continue to
be used.  However, this can be overridden at build time to force use of
the Rust implementation by setting

    export TRUSTY_KEYMINT_IMPL=rust

Note that this requires a concomitant change to the bootloader prebuilts
that include the Trusty prebuilts, to include the corresponding Rust
version of the KeyMint TA.

Bug: 197891150
Bug: 225036046
Test: VtsAidlKeyMintTargetTest
Change-Id: I05b4b7d49cea0ac1c10b3a2e8fa5c49374aa1675
2022-12-06 13:51:35 +00: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