Skip to content

DI: split depends.py#201

Open
gilles-peskine-arm wants to merge 4 commits intoMbed-TLS:mainfrom
gilles-peskine-arm:depends.py-split-spec
Open

DI: split depends.py#201
gilles-peskine-arm wants to merge 4 commits intoMbed-TLS:mainfrom
gilles-peskine-arm:depends.py-split-spec

Conversation

@gilles-peskine-arm
Copy link
Copy Markdown
Contributor

Repository split for depends.py: objectives, design, plan

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Comment thread architecture/depends-py-split.md Outdated

Create a directory where TF-PSA-Crypto can put Python code that can be used by both TF-PSA-Crypto and Mbed TLS. This directory is intended for _project knowledge_, i.e. data that describes TF-PSA-Crypto in a form that Mbed TLS can consume.

Code in this directory may call standard Python functions (e.g. set/list/dict functions, `re` functions, …) but should generally not do I/O or import `mbedtls_framework` modules. This way the code is flexible with respect to how it's consumed.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

should generally not do I/O or import mbedtls_framework modules

This was important for the dynamic loading hack in the original version of the outcome analysis split in Mbed-TLS/mbedtls#10676. But now that the directory is an ordinary directory on the load path, and the module is consumed through an ordinary import statement, I don;t think it matters anymore.

There are still some potential gotchas, but they're much weaker:

  • The code may be consumed by TF-PSA-Crypto or by Mbed TLS, so it must not assume that the project root is TF-PSA-Crypto, and it must not try to load other modules from TF-PSA-Crypto (outside of the same project_knowledge directory).
  • The code may be loaded with either Mbed TLS's version of the framework or TF-PSA-Crypto's version, so we must be careful when using a recent framework feature.

Just don't assume that the framework vintage is the one in TF-PSA-Crypto:
when a module is used by an Mbed TLS script, it uses Mbed TLS's framework
submodule.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
“Test coverage info” is a more accurate name, but “test case info” isn't
wrong and it's not worth the hassle of changing the name.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant