Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optee os update to 3.20+fio (take 2) #1059

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

ricardosalveti
Copy link
Member

No description provided.

igoropaniuk and others added 3 commits March 2, 2023 15:15
Update plug-and-trust to the latest release.

Relevant changes:
- b4fbe94 scp03 challenge: do not call OP-TEE
- 13497ec se050x: policy: do not modify requested policy
- 67cac4f ecdsa: op-tee signature handling
- 6068e92 ecdsa: support P-521 curve

Signed-off-by: Igor Opaniuk <[email protected]>
Operations that require a public key might fallback to a software
based implementation.

Operations that require a private key might fallback to a software
based implementation as long as the private key is not in the secure
element.

This helps making the software stack compatible with an extended
crypto set, allowing xtests to work correctly.

Signed-off-by: Ricardo Salveti <[email protected]>
Update OP-TEE to 3.20.

Signed-off-by: Igor Opaniuk <[email protected]>
Signed-off-by: Ricardo Salveti <[email protected]>
@ricardosalveti ricardosalveti requested a review from a team March 2, 2023 20:33
@ricardosalveti
Copy link
Member Author

Follow up of #1019 (as igor is off today and I needed to do a bit more testing due some other stuff).

@ricardosalveti
Copy link
Member Author

+-----------------------------------------------------
30376 subtests of which 0 failed
128 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@imx8mq-evk:~#

@ricardosalveti
Copy link
Member Author

+-----------------------------------------------------
30168 subtests of which 0 failed
128 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@imx6ulevk:~#

@ricardosalveti
Copy link
Member Author

With SE050:

+-----------------------------------------------------
30469 subtests of which 0 failed
127 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@imx8mm-lpddr4-evk-sec:~#

@ricardosalveti
Copy link
Member Author

+-----------------------------------------------------
31056 subtests of which 0 failed
128 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@qemuarm64-secureboot:~#

@ricardosalveti
Copy link
Member Author

+-----------------------------------------------------
30342 subtests of which 0 failed
128 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@am64xx-evm:~#

@ricardosalveti
Copy link
Member Author

+-----------------------------------------------------
30348 subtests of which 0 failed
128 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@kv260:~#

Copy link
Contributor

@MrCry0 MrCry0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UPDATE

Tested with main lmp-manifest +

<project name="meta-lmp" path="layers/meta-lmp" remote="ricardo" revision="optee"/>
30227 subtests of which 2 failed
128 test cases of which 1 failed
0 test cases were skipped
TEE test application done!
fio@imx6ullevk:~$ 
regression_1039.1 FAILED first error at /usr/src/debug/optee-test/3.20.0-r0/git/host/xtest/regression_1000.c:3206
regression_1039.2 FAILED first error at /usr/src/debug/optee-test/3.20.0-r0/git/host/xtest/regression_1000.c:3213
regression_1039 FAILED

@MrCry0 MrCry0 self-requested a review March 3, 2023 13:38
@MrCry0
Copy link
Contributor

MrCry0 commented Mar 3, 2023

+-----------------------------------------------------
30376 subtests of which 2 failed
128 test cases of which 1 failed
0 test cases were skipped
TEE test application done!
fio@apalis-imx8:~$ 
regression_1039.1 FAILED first error at /usr/src/debug/optee-test/3.20.0-r0/git/host/xtest/regression_1000.c:3206
regression_1039.2 FAILED first error at /usr/src/debug/optee-test/3.20.0-r0/git/host/xtest/regression_1000.c:3213
regression_1039 FAILED

@ricardosalveti
Copy link
Member Author

That is weird, both failed the same way. Will try on my imx6ullevk-sec as well.

@ricardosalveti
Copy link
Member Author

@MrCry0 can you run just the failed jobs and get the job log?

@MrCry0
Copy link
Contributor

MrCry0 commented Mar 3, 2023

That is weird, both failed the same way. Will try on my imx6ullevk-sec as well.

This is really weird and seems a factory cache issue.

The error is fixed in optee_test commit c7f0b40 ("ta: makefile: add compilation of subkey TAs")

* regression_1039 Test subkey verification
o E/LD:  init_elf:486 sys_open_ta_bin(a720ccbb-51da-417d-b82e-e5445d474a7a)
regression_1039.1 Load TA with two levels of subkeys
/usr/srcE/TC:? 0 ldelf_init_with_ldelf:131 ldelf failed with res: 0xffff000f
/debug/optee-test/3.20.0-r0/git/host/xtest/regression_1000.c:3206: xtest_teec_open_session(&session, &subkey1_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff000f = TEEC_ERRS
  regression_1039.1 FAILED
o regression_1039.2 Load TA with identity subkey
/usr/src/debug/optee-test/3.20.0-r0/git/host/xtest/regression_1000.c:3213: xtest_teec_open_session(&session, &subkey2_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff000f = S
  regression_1039.2 FAILED
  regression_1039 FAILED

So I think our 3.20 is OK.
The commit c7f0b40 SHOULD have been included in the optee_test for ricardo:optee meta-lmp.

Well, and this is not a sstate cache issue:

Level 21: Sstate summary: Wanted 3548 Local 0 Mirrors 0 Missed 3548 Current 0 (0% match, 0% complete)

Building locally.

@ricardosalveti
Copy link
Member Author

+-----------------------------------------------------
30109 subtests of which 2 failed
128 test cases of which 1 failed
0 test cases were skipped
TEE test application done!
root@stm32mp15-disco:~#

CKR_HOST_MEMORY, and I don't get this failure on every run.

* pkcs11_1007 PKCS11: Check operations release at session closure
/usr/src/debug/optee-test/3.20.0-r0/git/host/xtest/pkcs11_1000.c:1491: rv has an unexpected value: 0x2 = CKR_HOST_MEMORY, expected 0x0 = CKR_OK
/usr/src/debug/optee-test/3.20.0-r0/git/host/xtest/pkcs11_1000.c:1539: rv has an unexpected value: 0x2 = CKR_HOST_MEMORY, expected 0x0 = CKR_OK
  pkcs11_1007 FAILED

@ricardosalveti
Copy link
Member Author

+-----------------------------------------------------
3717 subtests of which 0 failed
27 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@stm32mp15-disco:~# xtest -t pkcs11

Just the pkcs11 tests work ok.

@ricardosalveti
Copy link
Member Author

CKR_HOST_MEMORY, and I don't get this failure on every run.

It fails when trying to allocate SHM memory for the test case, which is just a normal shm alloc operation, and why it works OK when retrying or when just running the pkcs11 tests.

@igoropaniuk is this something you faced as well? I'm ok merging even with this failure but we should investigate this one a bit more (not an issue for the normal scenario as we never really stress optee this way).

@ricardosalveti
Copy link
Member Author

+-----------------------------------------------------
30227 subtests of which 0 failed
128 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@imx6ullevk-sec:~#

@MrCry0 working fine here.

@ricardosalveti
Copy link
Member Author

Will merge so we get a wider testing on this (we can fix as needed).

@ricardosalveti ricardosalveti merged commit 292595e into foundriesio:main Mar 3, 2023
@MrCry0
Copy link
Contributor

MrCry0 commented Mar 4, 2023

+-----------------------------------------------------
30227 subtests of which 0 failed
128 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
root@imx6ullevk-sec:~#

@MrCry0 working fine here.

Yeah, I said - that is not an op-tee issue, but building one. Somehow factory built an older version of optee-test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants