-
Notifications
You must be signed in to change notification settings - Fork 3k
DO NOT MERGE - Update Mbed TLS to the current development version of Mbed TLS #9779
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
Conversation
@k-stachowiak, thank you for your changes. |
Note the failure in travis littlefs: |
If we can get that one fixed, we can run early CI job to get the test results |
Copying @mpg |
I have updated this PR with more recent Mbed TLS code and a configuration fix, however, I was not able to determine if we want to fix the config in this particular way, so I would leave that to be established in terms of a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think the way you fixed the config is appropriate.
@Patater @gilles-peskine-arm could one of you comment on the config question? And also have a look at the current CI failures as they seem to involve crypto. From the travis-ci/pr log (similar error in one of the travis-ci/littlefs runs):
|
@mpg |
@davidsaada We already seen this error in another PR. isn't this a bug in crypto.h file? As litttlefs is building K82F GCC_ARM application. |
@0xc0170 and all: Reason for this build failure is the fact that one can only include |
@Patater @mpg @gilles-peskine-arm I wonder if we can/should fix the issue in this PR. I can imagine selectively enabling and disabling PSA in particular targets' configuration, which could be part of the PR. |
@@ -148,6 +148,8 @@ conf set MBEDTLS_MPI_MAX_SIZE 512 | |||
|
|||
# The following configurations are needed for Mbed Crypto. | |||
# They are related to the persistent key storage feature. | |||
conf set MBEDTLS_PSA_CRYPTO_C |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't universally enable MBEDTLS_PSA_CRYPTO_C
, as MBEDTLS_PSA_CRYPTO_C
depends on an entropy source and not all boards have one. We need to leave it up to software that uses PSA Crypto to enable it for itself, like e.g. DeviceKey.cpp.
Boards that don't have entropy sources should use config-no-entropy.h shouldn't they? If so, then maybe everything that uses config.h does have an entropy source and we are OK with this change.
I don't see a reason we couldn't turn on MBEDTLS_PSA_CRYPTO_C universally for boards with entropy sources, but that's a big change to land so late in 5.12 development.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so if we back up a little bit, I think the motivation for this was us observing that check_config.h
didn't like that MBEDTLS_PSA_CRYPTO_STORAGE_C
was enabled but some of its prerequisites (which include MBEDTLS_PSA_CRYPTO_C
) were not.
So if I understand your comment correctly, it would probably be safer to go about it the other way round: keep MBEDTLS_PSA_CRYPTO_C
disabled by default, but also disable by default everything that depends on it, to keep check_config.h
happy. @Patater wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please keep MBEDTLS_PSA_CRYPTO_C
(and things that depend on it) disabled by default. Specific PSA targets enable it in targets.json
, and specific applications that can guarantee an entropy source enable it in mbed_app.json
or a custom Mbed TLS configuration.
@k-stachowiak What is the status here? Can this PR be finalized today? |
Hey 0xc0170. We were hoping to ship last nigh, but at the last moment found a couple of issues that failed our CI. We're now fixing them and the plan is to make the release this morning. |
Thanks for the update. As soon as its' ready will go into CI after approvals |
I have just pushed an update to his PR, but please note, it still is at a do not merge stage. |
If it passes Travis checks, we can schedule CI at least |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @k-stachowiak!
CI started |
CI restarted |
@@ -1 +1 @@ | |||
mbedtls-2.15.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be development
not development-proposed
. That's just a transient branch used for testing. This must be changed.
@@ -27,7 +27,7 @@ | |||
# | |||
|
|||
# Set the mbed TLS release to import (this can/should be edited before import) | |||
MBED_TLS_RELEASE ?= mbedtls-2.15.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, wrong branch. May have been better to use a commit id then a branch.
Test run: FAILEDSummary: 2 of 14 test jobs failed Failed test jobs:
|
Test run: FAILEDSummary: 3 of 9 test jobs failed Failed test jobs:
|
Tests needs to be restarted. The failure should not be on master anymore. cc @cmonr |
So we have a problem with this PR. The problem starts with this commit which defines the storage API as being present on all targets. I don't know why, but TLS/ @AndrzejKurek disabled storage by default in this commit, and above @Patater asked for So now TLS is designed to not assume storage is enabled, and has integrity checks for it, (which seems sensible as it won't be present everywhere), and the PSA Crypto API isn't enabled everywhere, and yet the storage options are being universally enabled on all platforms, even when This is a contradiction - you can’t have This PR appears to breaks TLS on ALL non-PSA platforms, because the storage options are set when PSA is absent. This single issue is holding up this PR from being merged. I propose we revert this commit, but that also means that all platforms that need storage will need to be re-enabled in cc: @Patater, @dannybenor, @0xc0170 |
@dannybenor @Patater Please advise and address this asap. |
I can't update this PR, so I've created a new one of #9920. That addresses the problem above, and the review comment I gave about the version in the I now propose this PR is closed in deference to #9920. Concerning the issue of the storage config options - my solution in commit 21c6c90, has been to make the storage configurations - (setting Previously these symbols were always defined for all platforms which could cause problems for targets that don't yet support PSA. This makes my Mbed TLS release work on all targets, and it solves my problem of how to get Mbed TLS merged quickly, but its not, in my view, the correct solution. If cc: @Patater, @dannybenor, @itayzafrir, @0xc0170 |
Closing as replacement is up. |
Description
This is a placeholder PR for the next Mbed TLS feature update
Pull request type
Reviewers
@hanno-arm
Release Notes