Skip to content

Move psasim into framework#238

Merged
davidhorstmann-arm merged 235 commits into
Mbed-TLS:mainfrom
minosgalanakis:rework/move-psasim
Jan 23, 2026
Merged

Move psasim into framework#238
davidhorstmann-arm merged 235 commits into
Mbed-TLS:mainfrom
minosgalanakis:rework/move-psasim

Conversation

@minosgalanakis

@minosgalanakis minosgalanakis commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Description

Part of the work required by Mbed-TLS/mbedtls#10487. Psasim was originally placed in framework directory, but moved to mbedtls while we were workign on it. Now this PR is migrating it back, while preserving the history

mpg and others added 30 commits July 29, 2025 12:23
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Update crypto pointer to development-restricted
Signed-off-by: Felix Conway <felix.conway@arm.com>
Update framework pointer to fix CI for generated tests
This will be needed when we change how many times some functions are
callled in ecp.c, making them more susceptible to inlining.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
…rge-public-20250916

Conflicts:
* `tf-psa-crypto`: updated to the merge of `development` and
  `development-restricted`.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
…erge-public-20250916

mbedtls: : merge public into restricted 2025-09-16
This commit restores all changelog entries between the
mbedtls-3.6.0 tag and the mbedtls-4.0.0-beta tag.

git diff ce4683e..09dc57d --name-status -- ChangeLog.d

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
ripgrep was used to check against the
tf-psa-crypto.v1.0.0-beta Changelog.

rg --multiline -F -f {changelog_to_check}.txt -o ../tf-psa-crypto-ChangeLog
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
ronald-cron-arm and others added 10 commits January 7, 2026 11:45
…ser-mbedtls

Fix non-determinism when generating mbedtls_config_check_user.h
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
…-prep2

SHA3 cleanup prep: Adapt to the split of test_suite_shax
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
…o-framework

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
@minosgalanakis

Copy link
Copy Markdown
Contributor Author

This PR was created again based on latest development and using the mbedtls-move-to-framework. The command used to create is are:

python /Users/mingal01/dev/git/mbedtls-docs/tools/bin/mbedtls-move-to-framework \
  --from /Users/mingal01/dev/git/test_move_26/mbedtls \
  --to /Users/mingal01/dev/git/test_move_26/mbedtls-framework \
  --path tests/psa-client-server/psasim:psasim

Eventually the script will break because it is impossible to automatically merge the branch into the framework. In addition to the reasons for doing so discussed above I noticed that we did not migrate the history of framework/psasim on the mbedtls side.

Git does not allow stacking explicitly different git histories for a file on the same tree and even if we merge the histories the --follow will only take the latest path. Also when trying to merge it will be incorrectly import the wrong state of some files.

The process now is:

  • Move framework/psasim -> framework/psasim_deprecated
  • Move mbedtls/tests/psa-client-server/psasim -> framework/psasim
  • Use the MERGE_HEAD as the resolution path for incoming psasim changes since we want the state of the mbedtls side and the ours/theirs is not correct.
  • Accept the psasim_deprecated as is.
  • Resolve all the other conflicts manually.

Merge conflict resolution

git checkout HEAD -- dco.txt && git add dco.txt
git checkout MERGE_HEAD -- psasim

git add -A psasim
git add -A psasim_deprecated

git rm -f -- \
  tests/psa-client-server/psasim/.gitignore \
  tests/psa-client-server/psasim/include/client.h \
  tests/psa-client-server/psasim/include/init.h \
  tests/psa-client-server/psasim/include/lifecycle.h \
  tests/psa-client-server/psasim/include/service.h \
  tests/psa-client-server/psasim/src/manifest.json \
  tests/psa-client-server/psasim/src/psa_ff_client.c \
  tests/psa-client-server/psasim/src/psa_ff_server.c 
  
git checkout --ours -- \
  .github/pull_request_template.md \
  .gitignore \
  CMakeLists.txt \
  CONTRIBUTING.md \
  LICENSE \
  README.md \
  scripts/lcov.sh \
  scripts/mbedtls_framework/interface_checks.py \
  scripts/project_scripts.py \
  scripts/sbom.cdx.json \
  tests/.gitignore \
  tests/.jenkins/Jenkinsfile

git add -- \
  .github/pull_request_template.md \
  .gitignore \
  CMakeLists.txt \
  CONTRIBUTING.md \
  LICENSE \
  README.md \
  scripts/lcov.sh \
  scripts/mbedtls_framework/interface_checks.py \
  scripts/project_scripts.py \
  scripts/sbom.cdx.json \
  tests/.gitignore \
  tests/.jenkins/Jenkinsfile

@minosgalanakis minosgalanakis added needs-review Every commit must be reviewed by at least two team members. and removed needs-work labels Jan 12, 2026

@gilles-peskine-arm gilles-peskine-arm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

At fc4689b, looks good to me for moving psasim while preserving the history in the mbedtls repository up to 0294b11.

The commit message d982361 is inaccurate (it's not yet moving anything to the framework, and it's also removing files, not just moving them), but that's not worth redoing the merge.

I'll submit another review for the subsequent code changes.

@gilles-peskine-arm gilles-peskine-arm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM at f51cf54

Comment thread scripts/all-core.sh
# 2) Mbed TLS's version of psa-client-server
# 3) Fallback to the framework location (default after move)
if [ -z "${PSASIM_PATH+set}" ]; then
if [ -d tests/psa-client-server ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not test for tests/psa-client-server/psasim, since that's what we care about?

@davidhorstmann-arm davidhorstmann-arm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

I've checked that the new psasim directory is consistent with mbedtls (except for a path change) and that the subsequent changes make sense.

@github-project-automation github-project-automation Bot moved this from In Review to Has Approval in Roadmap pull requests (new board) Jan 23, 2026
@davidhorstmann-arm davidhorstmann-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members. labels Jan 23, 2026
@davidhorstmann-arm davidhorstmann-arm merged commit 421f7a2 into Mbed-TLS:main Jan 23, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Has Approval to Done in Roadmap pull requests (new board) Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Design and code approved - may be waiting for CI or backports priority-high High priority - will be reviewed soon

Development

Successfully merging this pull request may close these issues.