Commit graph

28014 commits

Author SHA1 Message Date
Seth Moore
026bb7431d Generate COSE MAC with a callback, not raw key
The cppcose_rkp library was updated to generate MAC via callback instead
of passing keys around to allow for stronger MAC key protection.

Bug: 182928606
Test: VtsHalRemotelyProvisionedComponentTargetTest
Test: RemoteProvisionerUnitTests
Change-Id: Ia8a0410408fe3064e904c5282b52f172f8134b9a
Merged-In: Ia8a0410408fe3064e904c5282b52f172f8134b9a
2021-05-25 07:57:13 -07:00
Jooyung Han
4477ee052f Merge "android.hardware.common.fmq: update AIDL dump" 2021-05-25 00:45:22 +00:00
Jooyung Han
64512ccf27 android.hardware.common.fmq: update AIDL dump
Bug: n/a
Test: m (runs checkapi)
Change-Id: I2c58ee3857525497e4693509674dd023d05739d9
2021-05-23 07:45:54 +09:00
Steven Moreland
e19ee04dd6 Merge "Fix 'kernel_config' error." 2021-05-21 23:23:47 +00:00
Steven Moreland
3f40b2b624 Fix 'kernel_config' error.
The error is on property kernel_configs, but it is described as being on
kernel_config.

Bug: N/A
Test: N/A
Change-Id: Ifa58ac370775d5b5d01860be446bc961f52f667f
2021-05-21 20:28:03 +00:00
Steven Moreland
be6a797247 freeze compat matrix 6 for Android S
The current matrix is left in this same CL because this way, downstream
modifications to the current CL will automatically get absorbed into the
level 7 compatibility matrix. A CL on top of this will disable the 7
matrix and then get reverted in the aosp/master..goog/master merge
path.

WARNING: this is not actually the Android S compatibility matrix in this
CL, but rather the AOSP current matrix copied into
compatibility_matrix.6.xml. The actual S compatibility matrix is not
released on AOSP yet. However, this is the parts of it which are
available on AOSP, added here in order to allow Android T development
in a way that will merge happily downstream.

Bug: 178221726
Test: boot device, vts_treble_vintf_vendor_test
Test: inspect matrix by diffing matrix with old matrix using:
    m analyze_matrix &&
    system/libvintf/analyze_matrix/hals_for_release.py
Change-Id: Id83986fc5089eefc2292f0042753f739f4e01a44
(cherry picked from commit 86a518cfa6)
Merged-In: Id83986fc5089eefc2292f0042753f739f4e01a44
2021-05-21 19:14:28 +00:00
Treehugger Robot
4757105f06 Merge "KeyMint: improve HAL spec and tests" 2021-05-21 06:24:08 +00:00
David Drysdale
db0dcf5034 KeyMint: improve HAL spec and tests
- clarify & test BIGNUM spec
- allow alternative return codes when requesting device unique
  attestation
- use specific error for early boot import failure
- test more early boot key scenarios (in post-early-boot mode)

Test: VtsAidlKeyMintTargetTest
Change-Id: I70a342084a29144aef1ed0ff80fec02cc06ffbc0
2021-05-19 16:40:25 +01:00
Jack Yu
83d85178f1 Merge "Fixed the obsolete VTS owners" 2021-05-19 07:07:07 +00:00
Jack Yu
36b3af727d Fixed the obsolete VTS owners
Fix: 188209583
Test: None
Merged-In: I783cdedaad088ec1c52c2edfbea08f83c9b7a432
Change-Id: I783cdedaad088ec1c52c2edfbea08f83c9b7a432
(cherry picked from commit 879b3c0809)
2021-05-18 18:09:59 -07:00
Aaron Tsai
cbfd8e2d10 Fix emergencyDial tests in VTS 1.6
- Change to calling getVoiceRegistrationState_1_6() instead of getVoiceRegistrationState().
 - Fix incorrect voice registration state value

Bug: 187488263
Test: atest VtsHalRadioV1_6TargetTest
Change-Id: Iba5dcef20683bc6dca00b1c49899cfec5e1aac03
2021-05-19 00:40:14 +00:00
David Drysdale
cad5403270 Merge changes I10c4beea,I0efc30f3
* changes:
  KeyMint VTS: local RSA encryption
  KeyMint VTS: local asymmetric verification
2021-05-17 17:12:40 +00:00
David Drysdale
8d1d302ffa Merge "KeyMint HAL: cert dates are in milliseconds" 2021-05-17 13:45:21 +00:00
Tommy Chiu
77aae9e40e Merge "KeyMint vts: Correct the EC curve parameter and some return code" 2021-05-15 01:50:30 +00:00
Treehugger Robot
4862e3f6f3 Merge "KeyMint VTS: fix 3DES key sizes" 2021-05-14 21:55:00 +00:00
Treehugger Robot
44c294e621 Merge changes Id027b742,I486ccad8
* changes:
  Add additional DVBT settings example usage to sample_tuner_vts_config.xml
  Add additional DVBT settings to TunerTestingConfig
2021-05-14 20:59:39 +00:00
Gareth Fenn
b9722f1236 Add additional DVBT settings example usage to sample_tuner_vts_config.xml
Test: atest VtsHalTvTunerV1_0TargetTest

Change-Id: Id027b74267e97822f76607545bf23174a623e74e
Merged-In: I58bd8b941f6340d9e69153702b5269cc35c646da
2021-05-14 18:23:21 +00:00
Gareth Fenn
8fa4cff4ce Add additional DVBT settings to TunerTestingConfig
Test: atest VtsHalTvTunerV1_0TargetTest

Change-Id: I486ccad855662e6b9fa7cd1be3eb3949356d6a1f
Merged-In: I58bd8b941f6340d9e69153702b5269cc35c646da
2021-05-14 16:34:36 +00:00
Treehugger Robot
9f7a1e8317 Merge "Adding 1s time gap between slot1 & slot2 setDataThrottling tests" 2021-05-14 06:13:08 +00:00
Aaron Tsai
058de98e44 Merge "Fix VTS crash for getAvailableNetworks in Radio 1.6" 2021-05-14 03:02:50 +00:00
Treehugger Robot
0a3ca7b629 Merge "Use proper alignment and padding for pointer arguments -- HAL." 2021-05-14 00:23:33 +00:00
Anthony Stange
c75b96410e Merge "sensors: trivial fixes in comments" 2021-05-13 14:31:40 +00:00
Tommy Chiu
ced9a11bbe Merge "KeyMaster vts: Allow --dump_attestations to show whole DEVICE_UNIQUE_ATTESTATION" 2021-05-13 00:37:08 +00:00
Sergii Piatakov
59bb6f9394 sensors: trivial fixes in comments
Fix trivial typos in HAL and VTS comments.

Test: n/a
Change-Id: Ib52d6e1e8e83290cb4b1cf142677b8c772d606e7
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
2021-05-12 20:43:21 +00:00
Aaron Tsai
845f0fbd1e Fix VTS crash for getAvailableNetworks in Radio 1.6
Bug: 187494016
Test: atest VtsHalRadioV1_6TargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*getAvailableNetworks/0_slot1"
Change-Id: I3a3b5a0121cc97fbf6782da863d0ff6226504ee8
2021-05-12 20:31:07 +00:00
Aaron Tsai
b10493e757 Adding 1s time gap between slot1 & slot2 setDataThrottling tests
Modem has restriction that it can not process back-to-back thermal actions.
  For DSDS device, after slot-1 test finished, a 1s delay is needed before start slot-2 test.

Bug: 187968151
Test: atest VtsHalRadioV1_6TargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*setDataThrottling*"
Change-Id: I052d0d9c7c0ccc86a7590204679295268973c6cf
2021-05-12 20:27:27 +00:00
David Drysdale
59cae644e7 KeyMint VTS: local RSA encryption
Change RSA encryption (with public key) so it happens locally in the
test, rather than by invoking an ENCRYPT operation against KeyMint.

 - Specify MGF1 digest for OAEP mode as (now) required by AIDL spec.
 - Drop tests for too-long encryption inputs.
 - Adjust test comments to reflect decryption-only nature.
 - Change parameter checking tests to do so on DECRYPT rather than ENCRYPT.

Test: VtsAidlKeyMintTargetTest
Change-Id: I10c4beea28387eecfd0bc7c5dfd59a1b66fec21e
2021-05-12 16:09:44 +01:00
Andrew Scull
29ba064996 identity: fix CBOR 8-byte integer encoding
8-byte intergers are identified by the additional information having the
value 27.

Test: atest VtsHalIdentityTargetTest
Change-Id: I986162c4966275d7589d99c08c7323445e1f9e80
2021-05-12 15:08:51 +00:00
Tommy Chiu
c93c439ad3 KeyMint vts: Correct the EC curve parameter and some return code
Strongbox doens't support p-224. Change the curve to p-256 for better
compatibility.
Also update the tags to be filtered on the hw-enforcement list.

Change-Id: I3f587c5471ca68b88a565ee9ec2e27d1e9e11b17
2021-05-12 19:13:55 +08:00
David Drysdale
df8f52ee8d KeyMint VTS: local asymmetric verification
Change verification of ECDSA and RSA signatures so it happens locally
in the test, rather than by invoking a VERIFY operation against KeyMint.

Test: VtsAidlKeyMintTargetTest
Change-Id: I0efc30f3c96cd70ac636d34718eff53cc23f1480
2021-05-12 11:51:24 +01:00
Tommy Chiu
566d1cb6e0 KeyMaster vts: Allow --dump_attestations to show whole DEVICE_UNIQUE_ATTESTATION
This debug option used to dump only leaf certificate.

Bug: 187803288
Change-Id: I6cd55597e5127f8aada3dc31ab3e81595f4affbf
2021-05-12 18:04:19 +08:00
Benjamin Schwartz
75d7e5de7c Merge "power/stats: Correct language surrounding timestamps" 2021-05-11 23:42:59 +00:00
Benjamin Schwartz
1a16edd42b power/stats: Correct language surrounding timestamps
Bug: 187408125
Test: build
Change-Id: Ib3bdb7a16f4e9a5acec2e2afad41bbd6c036a27a
2021-05-11 10:22:13 -07:00
Xusong Wang
e3d0dad8d5 Use proper alignment and padding for pointer arguments -- HAL.
This CL modifies the shared memory allocation for pointer arguments to
use proper alignment and padding. We use default alignment (64) and
min padding (1) for HIDL drivers, and default alignment (64) and default
padding (64) for sAIDL drivers.

Bug: 184164929
Test: NNT_static
Change-Id: I22591640fa047d5f75d437edac1a7645d3b05526
Merged-In: I22591640fa047d5f75d437edac1a7645d3b05526
(cherry picked from commit 8bfa243972)
2021-05-11 09:17:34 -07:00
Treehugger Robot
43ae2ecfe4 Merge changes from topic "aosp-nnapi-reusable-execution-canonical"
* changes:
  Introduce reusable burst to canonical interface -- HAL.
  Introduce reusable execution to canonical interface -- HAL.
2021-05-11 07:02:17 +00:00
Treehugger Robot
7dc7626822 Merge "Fix bug for none fe test case" 2021-05-10 23:56:36 +00:00
Xusong Wang
b2e8085ce2 Introduce reusable burst to canonical interface -- HAL.
This CL modifies the canonical interface for reusable burst executions:
- Add new method IBurst::createExecution

The reusable burst execution will not fallback to another execution path
if sending request packet fails. The behavior of single-time burst
execution remains unchanged.

Additionally, this CL enables pointer -> shared memory conversion in
1.2/1.3 burst implementation.

Bug: 184073769
Test: NNT_static
Test: neuralnetworks_utils_hal_1_0_test
Test: neuralnetworks_utils_hal_1_1_test
Test: neuralnetworks_utils_hal_1_2_test
Test: neuralnetworks_utils_hal_1_3_test
Test: neuralnetworks_utils_hal_common_test
Change-Id: Iaac81668d247c2cb76d70e6abbd10f00b397b19f
Merged-In: Iaac81668d247c2cb76d70e6abbd10f00b397b19f
(cherry picked from commit ead6d37ae9)
2021-05-10 15:22:08 -07:00
Xusong Wang
5f6bedb43a Introduce reusable execution to canonical interface -- HAL.
This CL modifies the canonical interface for reusable executions:
- Add new interface: IExecution with compute and computeFenced methods
- Add new method IPreparedModel::createExecution

In NNAPI runtime, the new interface IExecution is used to
memoize request-specific execution resources (e.g. converted HAL
request). The expected usage is that, IPreparedModel::createExecution
will be invoked in the first computation of a reusable NDK ANNExecution
object, and IExecution::compute* will be invoked repeatedly.

The IPreparedModel::execute* methods are preserved to avoid redundant
object creation and memoization overhead for a single-time
(non-reusable) execution.

For a vendor implementing the canonical interfaces, only the
IPreparedModel::execute* methods will be called because there is
currently no reusable execution at HAL interface. A DefaultExecution
implementation is provided to reduce the work needed on the vendor side.

Bug: 184073769
Test: NNT_static
Test: neuralnetworks_utils_hal_1_0_test
Test: neuralnetworks_utils_hal_1_1_test
Test: neuralnetworks_utils_hal_1_2_test
Test: neuralnetworks_utils_hal_1_3_test
Test: neuralnetworks_utils_hal_common_test
Test: neuralnetworks_utils_hal_aidl_test
Change-Id: I91790bb5ccf5ae648687fe603f88ffda2c9fd2b2
Merged-In: I91790bb5ccf5ae648687fe603f88ffda2c9fd2b2
(cherry picked from commit 727a7b2104)
2021-05-10 15:21:36 -07:00
Henry Fang
dfb386f9f3 Fix bug for none fe test case
Test: atest VtsHalTvTunerV1_0TargetTest

bug: 182519645
Change-Id: I5deca5fe7f4f023cbadaf54f894657c1c6efe38a
Merged-In: I86458142ba4155274594a793eb939567bea24734
2021-05-10 16:09:40 +00:00
David Drysdale
2a73db3d9e KeyMint VTS: fix 3DES key sizes
DES key size is 7/8 of what's provided.

Test: VtsAidlKeyMintTargetTest
Change-Id: I645c1df11646d129a9421630cb6e5ed86edb8899
2021-05-10 10:59:19 +01:00
junyulai
88b237cfb5 [SP37] Change requirement of older event callback.
Currently, vendors are asked to duplicate old events to onEvent()
and onEvent_1_1(). This is not the typically way other modules
would do. Thus, remove the requirement of duplicate events,
and replace it with only firing onEvent_1_1 when feasible.

Note no VTS is added currently, from vendor feedback, there is
no reliable way to guarantee the callbacks will be called in the
test.

Test: hidl-gen -L hash -r android.hardware:hardware/interfaces \
      android.hardware.tetheroffload.control@1.1
Bug: 149467454
Merged-In: I75c1a7788e5d48fb3e2836d54b4fd854c0247214
Change-Id: I75c1a7788e5d48fb3e2836d54b4fd854c0247214
  (cherry-picked from ag/14408065)
2021-05-10 11:37:57 +08:00
David Drysdale
e650667341 KeyMint HAL: cert dates are in milliseconds
Test: None, comment change only
Change-Id: I6251d4a0ba74d111f4c107f9a54a5c45811aa90f
2021-05-06 08:25:33 +01:00
David Drysdale
6d454d5f28 Merge changes I32ad8ad2,I86047955
* changes:
  KeyMint VTS: symmetric import test with bad keylen
  KeyMint HAL: restore getKeyCharacteristics() docs
2021-05-06 05:26:31 +00:00
Shawn Willden
aef2a7562e Merge "Added a new test case to validate AES algorithm with invalid key sizes." 2021-05-05 19:48:28 +00:00
David Drysdale
c9bc2f742d KeyMint VTS: symmetric import test with bad keylen
Test: VtsAidlKeyMintTargetTest
Change-Id: I32ad8ad2ca2b18d3279ebe77ba63b34457ab888d
2021-05-05 15:59:39 +01:00
David Drysdale
d0bc4b9e64 KeyMint HAL: restore getKeyCharacteristics() docs
Commit 40eb8f53ea ("KeyMint AIDL tweaks") removed references to
getKeyCharacteristics() in docs, as it was a KeyMaster entrypoint
that wasn't present on the KeyMint HAL.

Commit dadb18dd29 ("Add getKeyCharacteristics method to KeyMint")
added the getKeyCharacteristics() entrypoint to KeyMint, as it
turned out it was needed after all.

This commit restores references to getKeyCharacteristics() in the
Tag.aidl documentation.

Test: VtsAidlKeyMintTargetTest
Change-Id: I860479554b85f4adfeddd4eee70a09cf5265c938
2021-05-05 15:58:43 +01:00
Tommy Chiu
384c82dd14 Merge "vts: Correct the parameters on strongbox" 2021-05-05 14:08:48 +00:00
Andy Hung
66ffc5b99a Merge "StreamOut: Fix STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED" 2021-05-04 20:49:44 +00:00
Shawn Willden
da2b9ae9f8 Merge changes Ic8949e22,Ia3a6363d
* changes:
  Update DeviceUniqueAttestationTest to match spec
  Make AttestKeyTest not crash if no cert is returned.
2021-05-04 19:50:41 +00:00
Tommy Chiu
3950b45a44 vts: Correct the parameters on strongbox
If GenerateKey() with user-provide key_blob, it needs to be specified in
the following begin() operations as well. Update the test case just to
take key_blob from private member instead of creating a local one.

Note:
- Remove redudent TAG_NO_AUTH_REQUIRED in DeviceUniqueAttestationTest

Change-Id: I81860294e1e7e01a57e66e08e75507a8292ec0c3
2021-05-04 23:09:56 +08:00