-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: secure_storage: psa: enable malloc arena for Mbed TLS #82099
Conversation
@@ -6,6 +6,8 @@ CONFIG_TEST_RANDOM_GENERATOR=y | |||
CONFIG_TIMER_RANDOM_GENERATOR=y | |||
CONFIG_MBEDTLS_PSA_CRYPTO_C=y | |||
|
|||
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put that as part of the CONFIG_MBEDTLS_PSA_CRYPTO_C
block? Its requirements (e.g. CONFIG_*_RANDOM_GENERATOR
) are above it.
Also, this will cause a (non-fatal) warning on board targets without CONFIG_COMMON_LIBC_MALLOC
/CONFIG_MINIMAL_LIBC
, which is fine, but can you add a small comment explaining what this is for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean adding the comment to the conf file itself? Sure, I'll do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Would make it easier for users to get the explanation, as it can show up as a warning in the build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, in your commit message:
The PSA Crypto implementation
🙂
9d300f9
to
b4cff35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! The compliance error is caused by some CI issue which should disappear once you rebase your PR onto the latest main
.
b4cff35
to
1e3dc59
Compare
The PSA Crypto implementation provided by Mbed TLS generally requires some amount of heap to function, so enable the arena unconditionally to make the test compatible with MINIMAL_LIBC configurations where the arena is disabled by default. Signed-off-by: Ilya Tagunov <[email protected]>
1e3dc59
to
3d36a9c
Compare
I've limited the size of the arena to fix qemu test failures. |
The PSA Crypto implementation provided by Mbed TLS generally requires some amount of heap to function, so enable the arena unconditionally to make the test compatible with MINIMAL_LIBC configurations where the arena is disabled by default.