Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mbedtls: reduce heap usage when building PSA crypto
By default PSA crypto library copies all the buffers that are passed in into the heap before further processing them. This is required when the PSA crypto library is on the secure side and it accepts buffers from a non-secure code. However this case in Zephyr is already handled by TF-M, so when the PSA crypto library is built (CONFIG_MBEDTLS_PSA_CRYPTO_C) then it will be on the non-secure side. Therefore this malloc copy is useless and it consumes heap memory. Setting MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS at Mbed TLS build time helps in removing this mechanism and it saves heap memory. (cherry picked from commit 11920e3) Original-Signed-off-by: Valerio Setti <vsetti@baylibre.com> GitOrigin-RevId: 11920e3 Change-Id: I626d40b4afcb809f13deda4f85d4665006cfc335 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5569732 Tested-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
- Loading branch information