scripts: Add dispatch include path and new generation location #307
Open
asmellby wants to merge 5 commits from
asmellby/feature/dispatch-library into main
pull from: asmellby/feature/dispatch-library
merge into: gh-Mbed-TLS:main
gh-Mbed-TLS:main
gh-Mbed-TLS:archive/20261015T005621Z-force/pull/322
gh-Mbed-TLS:archive/20260929T231924Z-rescue/rohankl-arm/mldsa-899-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/Thomasdjb/pr/spake2p-9342-public-key-import-export
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/fork-helper-unit-tests-create-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/iar-1.1.0-check-names
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/mbedtls_test_stack_usage-create
gh-Mbed-TLS:archive/20260929T231924Z-rescue/sridhar-design/cert_chain
gh-Mbed-TLS:archive/20260929T231924Z-rescue/JulioLoayzaM/add-fuzzing-seeds
gh-Mbed-TLS:dev/gilles-peskine-arm/generate_test_code-unicode-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/tpambor/key-wrap
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/not-not-grep-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/davidhorstmann-arm/add-python-package-update-script
gh-Mbed-TLS:archive/20260929T231924Z-rescue/minosgalanakis/tools/fix-auto-generated-files
gh-Mbed-TLS:framework_mergeback
gh-Mbed-TLS:archive/20260929T231924Z-rescue/bjwtaylor/empty-digest-failure
gh-Mbed-TLS:archive/20260929T231924Z-rescue/asmellby/feature/dispatch-library
gh-Mbed-TLS:archive/20260929T231924Z-rescue/sigvartmh/spake2p-test-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/bensze01/component-groups
gh-Mbed-TLS:archive/20260929T231924Z-rescue/bensze01/undef
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/server9-2048
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/all.sh-call_stack_trace
gh-Mbed-TLS:archive/20260929T231924Z-rescue/Marandil/fix/mbedtls-4314-test-data
gh-Mbed-TLS:archive/20260929T231924Z-rescue/bensze01/ci-testing-development
gh-Mbed-TLS:archive/20260929T231924Z-rescue/schneider-electric/dev/plaj-se/parse-rsassa-pss
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/pk_helpers-coverity-20260224
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/python-scripts-vintage-split-proposal
gh-Mbed-TLS:archive/20260929T231924Z-rescue/davidhorstmann-arm/code-size-measurement-script
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/sha3-shake-builtin-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/mpg/fix-quiet
gh-Mbed-TLS:archive/20260929T231924Z-rescue/TakutoYamane/fix-typo
gh-Mbed-TLS:archive/20260929T231924Z-rescue/rgqsch/feature/csr_challenge_password
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/make_generated_files-improve-for-3.6
gh-Mbed-TLS:archive/20260929T231924Z-rescue/irwir/lean_and_mean
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/all.sh-generate-only-before-checks-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/test-data_t-empty_is_empty-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/jean-baptisteboric-eaton/pkcs7_test_artifacts
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/assemble_changelog-utffromtimestamp
gh-Mbed-TLS:dev/bensze01/public-only-commit
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/config-py-help-directory-percent-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/valeriosetti/issue9255-framework
gh-Mbed-TLS:features/tls-defragmentation
gh-Mbed-TLS:archive/20260929T231924Z-rescue/gilles-peskine-arm/outcome-log-make-3.6-framework
gh-Mbed-TLS:md-psa-dispatch-3.6-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/benmcollins/add-rsassa-pss-keys
gh-Mbed-TLS:archive/20260929T231924Z-rescue/BrianSipos/119-add-name-constraints
gh-Mbed-TLS:issue-39-follow-up
gh-Mbed-TLS:revert-84-issue-72
gh-Mbed-TLS:dev/paul-elliott-arm/add_iop_key_agreement_exercise_key
gh-Mbed-TLS:dev/gilles-peskine-arm/psa-storage-test-cases-never-supported-positive-framework
gh-Mbed-TLS:issue-72
gh-Mbed-TLS:issue-39
gh-Mbed-TLS:dev/davidhorstmann-arm/port-psa-exercise-key-changes
gh-Mbed-TLS:dev/davidhorstmann-arm/add-some-test-helpers
gh-Mbed-TLS:archive/20260929T231924Z-rescue/paul-elliott-arm/remove_re_sub_count_positional_arg
gh-Mbed-TLS:dev/mpg/move-all-core-dev
gh-Mbed-TLS:issue-51
gh-Mbed-TLS:dev/gilles-peskine-arm/outcome-check-repeated-configurations-framework
gh-Mbed-TLS:dev/gilles-peskine-arm/generate_config_tests-require_psa
gh-Mbed-TLS:dev/gilles-peskine-arm/analyze_outcome-split-framework
gh-Mbed-TLS:dev/gilles-peskine-arm/config-full-booleans-only-framework
gh-Mbed-TLS:archive/20260929T231924Z-rescue/juhaylinen/disable_allow_abbrev
gh-Mbed-TLS:dev/gilles-peskine-arm/ssl-opt-psk-detection-framework
gh-Mbed-TLS:fix-everst-build
gh-Mbed-TLS:dev/minos/minor/code_wrappers_fix_identation
gh-Mbed-TLS:dev/minos/feature/code_wrappers
gh-Mbed-TLS:dev/davidhorstmann-arm/add-test-helpers
gh-Mbed-TLS:dev/davidhorstmann-arm/add-test-data-files
gh-Mbed-TLS:dev/gilles-peskine-arm/test_suite_config-booleans-framework
gh-Mbed-TLS:dev/ronald-cron-arm/fix-generation-of-psa-test-wrappers
gh-Mbed-TLS:dev/ronald-cron-arm/move-psa-headers
gh-Mbed-TLS:dev/external-contrib-copy/mbedtls-pr-9189
gh-Mbed-TLS:dev/davidhorstmann-arm/add-test-generation-files
gh-Mbed-TLS:dev/davidhorstmann-arm/add-mbedtls-framework-module
gh-Mbed-TLS:dev/davidhorstmann-arm/move-test-code
gh-Mbed-TLS:dev/davidhorstmann-arm/move-scripts
gh-Mbed-TLS:dev/gilles-peskine-arm/create-makefiles
No reviewers
Labels
Clear labels
approved
Design and code approved - may be waiting for CI or backports
bug
Something isn't working
dependencies
Pull requests that update a dependency file
DO-NOT-MERGE
enhancement
New feature or request
good-first-issue
Good for newcomers
help-wanted
This issue is not being actively worked on, but PRs welcome.
historical-reviewed
Reviewed & agreed to keep legacy PR/issue
historical-reviewing
Currently reviewing (for legacy PR/issues)
needs-adoption
stalled PR that someone should pick up and complete
needs-ci
Needs to pass CI tests
needs-design-approval
needs-info
An issue or PR which needs further info from the reporter / author
needs-preceding-pr
Requires another PR to be merged first
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
needs-work
priority-high
High priority - will be reviewed soon
priority-low
Low priority - this may not receive review soon
priority-medium
Medium priority - this can be reviewed as time permits
priority-scheduled
This PR is big - it will require time to be scheduled for review
priority-very-high
Highest priority - prioritise this over other review work
single-reviewer
This PR qualifies for having only one reviewer
size-l
Estimated task size: large (2w+)
size-m
Estimated task size: medium (~1w)
size-s
Estimated task size: small (~2d)
size-xs
Estimated task size: extra small (a few hours at most)
No labels
approved
bug
dependencies
DO-NOT-MERGE
enhancement
good-first-issue
help-wanted
historical-reviewed
historical-reviewing
needs-adoption
needs-ci
needs-design-approval
needs-info
needs-preceding-pr
needs-review
needs-reviewer
needs-work
priority-high
priority-low
priority-medium
priority-scheduled
priority-very-high
single-reviewer
size-l
size-m
size-s
size-xs
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
gh-Mbed-TLS/mbedtls-framework!307
Loading…
Reference in a new issue
No description provided.
Delete branch "asmellby/feature/dispatch-library"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
PSA crypto driver dispatch files are generated into
dispatch/instead ofcore/in newer TF-PSA-Crypto versions. API headers that rely on driver and dispatch implementation details are also moved frominclude/todispatch/include/.Update the framework scripts to work with both the old and new layouts.
PR checklist
(Priority note: this fits under our “PSA crypto driver standardization” work, for which we have allocated a little bandwidth this quarter. Thanks Aksel for contributing it!)
I don't think
tf_psa_crypto_version()is necessary. But if it is, it needs to pass the static checks. Otherwise looks good to me.@ -22,11 +22,15 @@ COMMON_GENERATION_SCRIPTS = []What's the point of checking the version? I'd prefer to avoid relying on any version number.
@ -171,6 +171,7 @@ def main():else:parser.add_argument('--include', '-I',action='append', default=['tf-psa-crypto/include','tf-psa-crypto/dispatch/include',There's still a reference to
core/psa_crypto_driver_wrappers.hinscripts/check_names.py, and even a reference tolibrary/psa_crypto_driver_wrappers.hwhich only exists in the 3.6 branch. It was introduced in634e0d25cband I think it's now obsolete (especially sincecheck_names.pypasses just fine with the generated files indispatch), but I'm not completely sure. If it's obsolete, we might as well remove it now, although it would be strictly speaking out of scope.@ -22,11 +22,15 @@ COMMON_GENERATION_SCRIPTS = []I did it to limit when the new layout was considered to releases that are "supposed to" have the new layout. But unconditionally allowing the new layout does mean we avoid the version check. Updated to remove the version check.
@ -171,6 +171,7 @@ def main():else:parser.add_argument('--include', '-I',action='append', default=['tf-psa-crypto/include','tf-psa-crypto/dispatch/include',Good catch. Updated to include the new dispatch include path (which was missing) and generalizing the excluded autogen files. I agree that it looks like the script passes even if
psa_crypto_driver_wrappers.hisn't excluded, so if you want me to, I can remove the exclusion instead. I don't know if the lack of "bad" symbols in the generated file is a long-term commitment or just how things are right now.LGTM, but let's not add to the complexity in
check_names, please remove thepsa_crypto_driver_wrappers.hexclusion.@ -171,6 +171,7 @@ def main():else:parser.add_argument('--include', '-I',action='append', default=['tf-psa-crypto/include','tf-psa-crypto/dispatch/include',The problem isn't with symbols that violate our naming conventions, but about symbols that look like a typo because
check_namesfinds their use but not their definition or vice versa.Since
634e0d25cb, we've both fixed a few bugs incheck_names.pyand changed the structure of the driver wrapper code. Todaycheck_names.pypasses on 3.6 if I remove all references topsa_crypto_driver_wrappers.h(all of them in exclude lists) (69fa1da16d). So please go ahead and do that.@ -171,6 +171,7 @@ def main():else:parser.add_argument('--include', '-I',action='append', default=['tf-psa-crypto/include','tf-psa-crypto/dispatch/include',Done.
LGTM at
957b8a1b74View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.