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

TF-M patch: Handle extended stack frame in tfm_svcall_psa_call #10027

Merged
merged 2 commits into from Mar 11, 2019

Conversation

@mikisch81
Copy link
Contributor

mikisch81 commented Mar 11, 2019

Description

  • Fix a bug in TF-M core in which during psa_call SVC handling assumed that the stacking was done without FP registers, which is incorrect when the thread code which called the SVC used FP commands.
  • Fix failing attestation test on LPC55S69.
  • Link to bug tracking: https://developer.trustedfirmware.org/T276.

Now all the PSA & attestation tests pass on LPC55S69:

| target            | platform_name | test suite                                                           | result | elapsed_time (sec) | copy_method |
|-------------------|---------------|----------------------------------------------------------------------|--------|--------------------|-------------|
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_attestation-test_a001 | OK     | 33.8               | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c001      | OK     | 18.34              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c002      | OK     | 19.14              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c003      | OK     | 19.06              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c004      | OK     | 19.07              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c005      | OK     | 18.82              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c006      | OK     | 18.96              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c007      | OK     | 18.9               | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c008      | OK     | 18.88              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c009      | OK     | 18.5               | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c010      | OK     | 18.67              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c011      | OK     | 18.27              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c012      | OK     | 18.48              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c013      | OK     | 18.51              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c014      | OK     | 18.54              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c015      | OK     | 18.36              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c016      | OK     | 18.74              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c017      | OK     | 18.67              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c018      | OK     | 18.26              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c019      | OK     | 18.29              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c020      | OK     | 18.65              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c021      | OK     | 18.28              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c022      | OK     | 18.8               | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c023      | OK     | 18.45              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c024      | OK     | 18.78              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c025      | OK     | 18.93              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c026      | OK     | 18.89              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c027      | OK     | 18.46              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c028      | OK     | 18.36              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c029      | OK     | 18.98              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c030      | OK     | 18.34              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c031      | OK     | 18.39              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c032      | OK     | 19.17              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c033      | OK     | 19.2               | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c034      | OK     | 18.42              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c035      | OK     | 18.38              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c036      | OK     | 18.89              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c037      | OK     | 19.07              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c038      | OK     | 18.66              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c039      | OK     | 19.64              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c040      | OK     | 21.27              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c041      | OK     | 20.81              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c042      | OK     | 21.22              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_crypto-test_c043      | OK     | 22.94              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s001         | OK     | 18.61              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s002         | OK     | 18.72              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s004         | OK     | 18.26              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s005         | OK     | 18.26              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s006         | OK     | 18.18              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s007         | OK     | 18.36              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s008         | OK     | 18.3               | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s009         | OK     | 18.47              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-components-target_psa-tests-compliance_its-test_s010         | OK     | 18.11              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-mbed-crypto-sanity                                     | OK     | 21.03              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-psa-attestation                                        | OK     | 21.38              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-psa-crypto_access_control                              | OK     | 21.69              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-psa-crypto_init                                        | OK     | 18.43              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-psa-entropy_inject                                     | OK     | 19.48              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-psa-its_ps                                             | OK     | 19.84              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-psa-spm_client                                         | OK     | 23.91              | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-psa-spm_server                                         | OK     | 21.5               | default     |
| LPC55S69_NS-ARMC6 | LPC55S69      | mbed-os-tests-psa-spm_smoke                                          | OK     | 18.02              | default     |
mbedgt: test suite results: 62 OK

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@orenc17

Release Notes

TF-M patch: Handle extended stack frame in tfm_svcall_psa_call
- Fix failing attestation test on LPC55S69
- Link to bug tracking: https://developer.trustedfirmware.org/T276
@mikisch81

This comment has been minimized.

Copy link
Contributor Author

mikisch81 commented Mar 11, 2019

@alzix
Copy link
Contributor

alzix left a comment

LGTM, make sure to upstream it to TF-M.
Please register this commit as a TF-M patch in our importer in follow-up PR or consider adding it to this one.

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Mar 11, 2019

Ci restarted

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Mar 11, 2019

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Mar 11, 2019

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests
@NirSonnenschein

This comment has been minimized.

Copy link
Contributor

NirSonnenschein commented Mar 11, 2019

restarted again to include latest commit

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Mar 11, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 3
Build artifacts

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Mar 11, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Mar 11, 2019

Waiting for final @ChiefBureaucraticOfficer approval

@alzix

This comment has been minimized.

Copy link
Contributor

alzix commented Mar 11, 2019

This is a mandatory fix.
Without it we will have fails in regression tests.

@0xc0170 0xc0170 merged commit 83d7019 into ARMmbed:master Mar 11, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9215 cycles (-861 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.