-
Notifications
You must be signed in to change notification settings - Fork 29
Move private headers to a private directory #175
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
Open
amtkarm1
wants to merge
5
commits into
Mbed-TLS:main
Choose a base branch
from
amtkarm1:task-private-headers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+82
−0
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cfe684f
Modifications done by executing the script for each private header (i…
amtkarm1 f222d11
Fix erroneous include change
amtkarm1 37fe490
Fix check_names.py script, now accounts for newly moved headers too
amtkarm1 6710ca8
Add preprocessor code, for compatibility with older mbedtls version, …
amtkarm1 52d09a9
Changed the private header preprocessor condition, so that the old (n…
amtkarm1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is good for development, but the framework needs to keep working with 3.6 as well. I suggest
(Here and in all similar places obviously.) (Edit:
MBEDTLS_VERSION_MAJOR
is defined by includingbuild_info.h
which should already be included everywhere.)I also suggest you create a "shadow" 3.6 PR where the only thing you do is change the framework pointer to the head of this PR.
Your goal is now to get a green CI both on the mbedtls development PR and the shadow 3.6 PR :)
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.
Based on the results of CI for this PR it seems to me that:
development
of tf-psa-crypto: OKdevelopment
of mbedtls repo: FAILmbedtls-3.6
of mbedtls: OKAs far as I can tell 3.6 testing should be fine, but then I'm a bit surprised that
tf-psa-crypto
is also OK with the files being moved whiledevelopment
of mbedtls repo fails. I would expect both to fail for the same reason, i.e. files being moved. This made me think on the proposed suggestion of#if MBEDTLS_VERSION_MAJOR >= 4
: shouldn't we also checkPSA_CRYPTO_API_VERSION_MAJOR
for the case in which tf-psa-crypto repo is built as standalone?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.
Not
PSA_CRYPTO_API_VERSION_xxx
: that's the API version which is irrelevant. We'd needTF_PSA_CRYPTO_VERSION_xxx
(or whatever the name is supposed to be) which doesn't exist yet.Uh oh!
There was an error while loading. Please reload this page.
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, thanks for the details!
Therefore I suspect that we might have issues with this PR series as follows. CI tests in this PR for standalone tf-psa-crypto here are passing just because the the current
default
branch of tf-psa-crypto is used and the old headers' path is picked. But there are tests on Mbed-TLS/TF-PSA-Crypto#318 which are failing due to missing test headers (I didn't check them all, but at leasttest_tf_psa_crypto_out_of_source
does):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.
Yeah, sorry, my suggestion was not correct, I noticed and discussed it on Slack but failed to report the outcome of the discussion here. I think while waiting for
TF_PSA_CRYPTO_VERSION_xxx
I suggestIn tf-psa-crypto standalone,
MBEDTLS_VERSION_MAJOR
will not be defined. In mbedtls development, it will be defined and>= 4
. Those are the two cases where we want the new path. In mbedtls 3.6, it will be defined and< 4
; this is the only case where we want the old path.(Alternatively, we could make this whole series of PRs depend on c323 but I'd rather not: this is a very conflict-prone series of PR so we should try not to delay it if we can avoid it.