mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Python libraries to generate wrapper code for PSA functions

Open gilles-peskine-arm opened this issue 11 months ago • 0 comments

Write generic Python libraries that can be used to generate wrapper code for PSA functions. We intend to use them for several purposes:

  • Generate driver wrappers (replacing the current implementation using Jinja2 templates)
  • Generate client-side and server-side IPC code to test client-server usage
  • Tracing helpers
  • etc.

We have merged the core libraries as part of a security fix:

As part of the security fix, we only reviewed the output of the generator, not the generator code (which was only reviewed for non-harmfulness, not for correctness and maintainability). As a consequence, the goals of this task are:

  1. Review c_wrapper_generator.py and c_parsing_helper.py.
  2. Extract the code from tests/scripts/generate_psa_wrappers.py that's generically useful for all PSA wrapper code into a new module and review it fully.

gilles-peskine-arm avatar Mar 20 '24 17:03 gilles-peskine-arm