Skip to content

Mbed TLS: Fix ECC hardware double initialization #9005

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 1 commit into from
Dec 7, 2018

Conversation

yanesca
Copy link
Contributor

@yanesca yanesca commented Dec 7, 2018

Description

We initialized the ECC hardware before calling
mbedtls_ecp_mul_shortcuts(). This in turn calls
mbedtls_ecp_mul_restartable(), which initializes and frees the hardware
too. This issue has been introduced by recent changes and caused some
accelerators to hang.

We move the initialization after the mbedtle_ecp_mul_shortcuts() calls
to avoid double initialization.

Integration

An identical fix has been submitted to the Mbed TLS repository:
Mbed-TLS/mbedtls#2267

It has been reviewed and approved there and will be merged in the next Mbed TLS release.

Testing

This issue has been raised in #8985 and I can't reproduce it. I have asked for manual testing of this fix there and waiting for a confirmation that this indeed resolves the problem.

Pull request type

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

We initialized the ECC hardware before calling
mbedtls_ecp_mul_shortcuts(). This in turn calls
mbedtls_ecp_mul_restartable(), which initializes and frees the hardware
too. This issue has been introduced by recent changes and caused some
accelerators to hang.

We move the initialization after the mbedtle_ecp_mul_shortcuts() calls
to avoid double initialization.
@ciarmcom
Copy link
Member

ciarmcom commented Dec 7, 2018

@yanesca, thank you for your changes.
@ARMmbed/mbed-os-tls @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM

@Patater
Copy link
Contributor

Patater commented Dec 7, 2018

This targets Mbed OS 5.11.0rc3 to fix a regression present in Mbed OS 5.11rc1 (#8927).

@adbridge
Copy link
Contributor

adbridge commented Dec 7, 2018

@ashok-rao could you please test if this fixes the Pelion Nuvoton issue ?

@adbridge
Copy link
Contributor

adbridge commented Dec 7, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 7, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

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.

7 participants