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

Dont unlock more than one secret at a time #31

Closed
DrPeterVanNostrand opened this issue Sep 12, 2018 · 2 comments
Closed

Dont unlock more than one secret at a time #31

DrPeterVanNostrand opened this issue Sep 12, 2018 · 2 comments
Assignees

Comments

@DrPeterVanNostrand
Copy link
Contributor

munlock() will unlock full pages of memory. Right now, we call munlock() upon every secret deallocation. This means that we may be preemptively unlocking secrets from RAM, if two secrets occupy the same page of memory, and one is dropped before the other.

Implement a counter that keeps track of the number of secrets allocated in each page of memory. Wait until a page's count is zero before calling munlock() on the page.

The counter should be incremented via ContainsSecret::mlock_secret(&self) and ContainsSecret::munlock_secret(&self). The counter must be thread safe.

@afck
Copy link
Collaborator

afck commented Oct 2, 2018

If we do #42, this issue is probably obsolete.

@afck
Copy link
Collaborator

afck commented Jun 11, 2019

Closing in favor of #42.

@afck afck closed this as completed Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants