Hey Chris
Can you try out this patch as a fix?
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/11953
On my end it seems to prevent any failures in the attestation tests
Raef
________________________________________ From: Chris.Brand@infineon.com Chris.Brand@infineon.com Sent: 15 October 2021 22:47 To: tf-m@lists.trustedfirmware.org Cc: Raef Coles Subject: PSA Arch attestation test failure
Hi,
We’re seeing a failure in the PSA Arch attestation test, specifically: TEST: 601 | DESCRIPTION: Testing attestation initial attestation APIs | UT: psa_initial_attestation [Info] Executing tests from non-secure [Check 1] Test psa_initial_attestation_get_token with Challenge 32 [Check 2] Test psa_initial_attestation_get_token with Challenge 48 Failed at Checkpoint: 1 Actual: -138 Expected: 0
TEST RESULT: FAILED (Error Code=0x1)
The failure is seen on PSoC, but only the gcc Release build (armclang and the other three gcc builds are all fine. Haven’t tested IAR), which makes it tricky to debug. PSoC uses the common attest HAL code, though, so I imagine the issue may also be present on other platforms.
Bisecting the problem leads to commit 09d71ffd40368b978d428744ad7ba0d3963f8d1d (“Platform: Use OTP as backing for attestation data”).
-138 is PSA_ERROR_BUFFER_TOO_SMALL.
I’m running gcc-arm-none-eabi-7-2018-q2-update, in case that matters.
Chris Brand
Cypress Semiconductor (Canada), Inc. Sr Prin Software Engr CSCA CSS ICW SW PSW 1 Office: +1 778 234 0515 Chris.Brand@infineon.commailto:Chris.Brand@infineon.com