Skip to content
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

Reducing stack memory consumption #355

Open
pouyaashraf opened this issue Jan 27, 2020 · 2 comments
Open

Reducing stack memory consumption #355

pouyaashraf opened this issue Jan 27, 2020 · 2 comments

Comments

@pouyaashraf
Copy link

pouyaashraf commented Jan 27, 2020

Description

When using the mbedtls library on certain embedded platforms, a stack-allocated buffer (buf in mbedtls_rsa_rsassa_pss_verify_ext) provokes a stack overflow. The platform in question is LittleKernel running on ARM, where we unfortunately don't have the option of increasing the stack alotted to the kernel. Changing the buf variable to have static storage duration resolves this, but then the function becomes thread un-safe which is not desirable.

Issue request type

[ ] Question
[x] Enhancement
[ ] Bug
@pouyaashraf
Copy link
Author

To add to this, the amount of memory allocated by buf is 1KiB, and it's done here: https://github.com/ARMmbed/mbed-crypto/blob/development/library/rsa.c#L2165

@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/IOTCRYPT-1042

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants