Skip to content

Move everest headers #235

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

Closed
wants to merge 20 commits into from

Conversation

bjwtaylor
Copy link

@bjwtaylor bjwtaylor commented Mar 24, 2025

Description

Move everest headers. Depends Mbed-TLS/mbedtls-framework#153. Contributes to #229 depends Mbed-TLS/mbedtls#10091 re-added old everest path to allow merge. Will be removed in a seperate PR.

PR checklist

  • changelog provided
  • framework PR not required
  • mbedtls development PR provided Move everest headers mbedtls#10091
  • mbedtls 3.6 PR not required because: No Backports
  • mbedtls 2.28 PR not required because: No Backports
  • tests not required because: No changes

@bjwtaylor bjwtaylor force-pushed the move-everest-headers branch 8 times, most recently from cbfabef to 91fe5e9 Compare March 31, 2025 07:55
@bjwtaylor bjwtaylor force-pushed the move-everest-headers branch 2 times, most recently from 36b5120 to 248d479 Compare April 2, 2025 08:42
@bjwtaylor bjwtaylor force-pushed the move-everest-headers branch from 248d479 to 0cae869 Compare April 3, 2025 09:52
@bjwtaylor bjwtaylor marked this pull request as ready for review April 4, 2025 06:43
@bjwtaylor bjwtaylor added needs-review Every commit must be reviewed by at least two team members needs-reviewer This PR needs someone to pick it up for review labels Apr 8, 2025
@felixc-arm felixc-arm self-requested a review April 15, 2025 10:01
@bjwtaylor bjwtaylor force-pushed the move-everest-headers branch 9 times, most recently from d824ad0 to 1897fad Compare April 23, 2025 06:56
@bjwtaylor bjwtaylor force-pushed the move-everest-headers branch from 1897fad to ca5bc62 Compare April 23, 2025 11:53
@gilles-peskine-arm gilles-peskine-arm self-requested a review April 24, 2025 09:32
@gilles-peskine-arm gilles-peskine-arm removed the needs-reviewer This PR needs someone to pick it up for review label Apr 24, 2025
Ben Taylor added 16 commits May 29, 2025 07:41
Signed-off-by: Ben Taylor <[email protected]>
Signed-off-by: Ben Taylor <[email protected]>
Signed-off-by: Ben Taylor <[email protected]>
@bjwtaylor bjwtaylor force-pushed the move-everest-headers branch from 6a13f3b to 3a4aff4 Compare May 29, 2025 06:42
Signed-off-by: Ben Taylor <[email protected]>
Copy link
Contributor

@felixc-arm felixc-arm left a comment

Choose a reason for hiding this comment

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

Generally LGTM (apart from 1 point + framework conflict). The approach of duplicating and then removing the headers seems fine to me 👍

$<INSTALL_INTERFACE:include>
PRIVATE ${TF_PSA_CRYPTO_DIR}/core
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/p256-m>)
$<BUILD_INTERFACE:${TF_PSA_CRYPTO_DIR}/drivers/everest/include/tf-psa-crypto/private/>)
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't quite see why the p256-m line was removed here.

Copy link
Author

Choose a reason for hiding this comment

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

Neither can I, good spot. I'll re-add it and we can see if it causes issues with the CI.

Copy link
Contributor

Choose a reason for hiding this comment

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

You might have noticed already, but the ) here is causing some issues...

@@ -0,0 +1,21 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess that 8706d77 is some kind of workaround to merge successive steps in different repositories with all steps having a green CI. But I don't understand why this particular workaround is needed. At the very least, the commit message should explain.

I'm surprised that duplicating files is the best workaround. I presume that this is because mbedtls expects those files in a particular location. But I'd expect to resolve this by first patching mbedtls to accept both the old location and the new location, then patching crypto to move the files, and finally patching mbedtls to stop accepting the old location. Why duplicate files instead?

Please describe the piecewise merge plan. Without this, I can't review effectively.

Copy link
Author

Choose a reason for hiding this comment

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

So, yes you are correct this a giant workaround to make each PR in the chain green, so it can be merged. Unfortunately we can't simply duplicate the paths as the dependencies are such that some of the tests search for the paths across repos. If they don't exist they will fail, as we cannot remove both the test and the path simultaneously the only way we can get it to merge cleanly is to duplicate the files and then remove once these paths are cleaned up. So briefly the merge plan is as follows:

  1. Merge this PR Move everest headers #235, this basically duplicates the paths.
  2. Merge Move everest headers mbedtls#10091, this redirects the path's in mbedtls to the new locations.
  3. Merge Remove Old Everest Paths #303, remove the old paths.
    Let me know what you think.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've lost track.

some of the tests search for the paths across repos

Which tests are those?

Copy link
Author

@bjwtaylor bjwtaylor Jun 5, 2025

Choose a reason for hiding this comment

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

So, I think the problem is caused by the paths in scripts/generate_visualc_files.pl from the mbedtls repo. Though there maybe another way round it. When I was re-orging it, I was coming up against a number of issues when getting this to merge cleanly and I was trying to avoid a 4th PR. So this seemed the fastest way to get this to work as a non dependent merge. We were discussing this in the morning standup and were thinking maybe we do this as a dependent merge, as the non dependent merge it too complex? However I thought now it's already split we may as well merge it as is. Let me know what you think though, if you don't like the way it currently works maybe we just go back to a dependent merge? I'm also starting to loose track with all the various reworking of PR's to get them to do non-dependent merges, so maybe it might be better to keep it simple? Let me know what you think though?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at generate_visualc_files.pl, the only thing I see that would break is that it insists that all (@thirdparty_header_dirs, @thirdparty_source_dirs) must exist. I think I understand the intent: if an entry doesn't exist, it's probably a typo and suggests that some necessary directory is missing. But we could temporarily relax the check. That wouldn't break the CI since we don't test with Everest or p256-m on Windows.

Incompatible merges are hard to understand and disrupt everyone, so I'd rather avoid them if there's another sensible way. And here so far I don't see anything complicated with a series of compatible merges.

@gilles-peskine-arm gilles-peskine-arm added needs-work and removed needs-review Every commit must be reviewed by at least two team members labels Jun 4, 2025
Ben Taylor added 2 commits June 5, 2025 08:15
Signed-off-by: Ben Taylor <[email protected]>
Signed-off-by: Ben Taylor <[email protected]>
@valeriosetti
Copy link
Contributor

Superseded by #319

@github-project-automation github-project-automation bot moved this from In Development to Done in Roadmap pull requests (new board) Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-work priority-high High priority - will be reviewed soon
Development

Successfully merging this pull request may close these issues.

6 participants