-
Notifications
You must be signed in to change notification settings - Fork 10
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
Reduce stack footprint #200
Conversation
dbd3170
to
b30f5f8
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.
👍
After a quick read of the diffs, my feelings are mixed: on the one hand, this patch sure should fix the issue; one the other hand, it adds a lot of complexity by exposing the boxing. Moreover, I struggle to see the pattern you followed to decide which object to box. Wouldn't boxing the KMIP |
How course, boxing the full I chose to box some elements based on the size they represent in their enum/struct (thank you @ackRow for the reminder 😉). The threshold is totally arbitrary: if the variable is over something like 50 bytes, I did the box. AFAIK there is no magic threshold to choose when to put on the heap |
* CI: remove min stack size * Box in Attributes * Box key_wrapping_data and more cryptographic_parameters * Box attributes in KeyValue * Box BigUint and SafeBigUint in KeyMaterial
* feat: replace attribute rotation to access policy rekey * refacto: move policy and rekey action in dedicated files * chore: change vendor attribute name for covercrypt rekey action * feat: change CLI command rotate to rekey and update tests * fix: update user key locate tests * ci: fix pyo3 tests * ci: use last cloudproof python branch * refacto: master keys rekey * feat(pyo3): support and test policy attribute removal and renaming * refacto: reuse updated private key to refresh user key * ci: update cloudproof_kms_js branch * refacto: factor user keys update inner for loop in `refresh_user_decryption_key` * fix: cli rekey imports * ci: fix cargo udeps * feat: add cli command `cc keys rekey` and `cc keys prune` * feat: add cli policy edit command and tests * fix: remove deadcode and fix comments * use closures in CC keys update * fix: group KMS objects with their IDs * fix: use release test to avoid worker stack overflow upon test error * fix: review * fix: define type `KmipKeyUidObject` to store a key UID and its KmipObject * fix: apply review suggestions (cherry picked from commit ebd196e8ed251603b657e1e6445a9e6d8e75ce48) * ci: double `RUST_MIN_STACK` to `4MB` to avoid stack overflow during tests * docs: update doc of CLI rekey and policy edit * docs: update CLI doc and CHANGELOG * fix: Reduce stack footprint (#200) * CI: remove min stack size * Box in Attributes * Box key_wrapping_data and more cryptographic_parameters * Box attributes in KeyValue * Box BigUint and SafeBigUint in KeyMaterial * chore: update KMS version to `4.13.0` --------- Co-authored-by: Manuthor <manu.coste@gmail.com> Co-authored-by: Théophile BRÉZOT <theophile.brezot@cosmian.com> Co-authored-by: Thibs <ThibsG@users.noreply.github.com>
fixes #193