Skip to content

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

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

Merged
merged 2 commits into from
Mar 11, 2019
Merged

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

merged 2 commits into from
Mar 11, 2019

Conversation

mikisch81
Copy link
Contributor

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

- Fix failing attestation test on LPC55S69
- Link to bug tracking: https://developer.trustedfirmware.org/T276
@mikisch81
Copy link
Contributor Author

@mmahadevan108 @alzix FYI

Copy link
Contributor

@alzix alzix left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor

0xc0170 commented Mar 11, 2019

Ci restarted

@mbed-ci
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
Copy link
Contributor

restarted again to include latest commit

@mbed-ci
Copy link

mbed-ci commented Mar 11, 2019

Test run: SUCCESS

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

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 11, 2019

Waiting for final @ChiefBureaucraticOfficer approval

@alzix
Copy link
Contributor

alzix commented Mar 11, 2019

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

@ghost ghost added the PM_ACCEPTED label Mar 11, 2019
@0xc0170 0xc0170 merged commit 83d7019 into ARMmbed:master Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants