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

Audit spin #18

Closed
Shnatsel opened this issue Aug 27, 2019 · 5 comments
Closed

Audit spin #18

Shnatsel opened this issue Aug 27, 2019 · 5 comments

Comments

@Shnatsel
Copy link
Member

spin crate provides no_std spinlocks. It has 6000 downloads/day on crates.io and is a transitive dependency of lazy_static! in no_std mode.

@Shnatsel
Copy link
Member Author

@64 has audited the RwLock implementation and discovered issues: mvdnes/spin-rs#65
This is now a RustSec advisory: rustsec/advisory-db#132

They have also rewritten it based on Folly to fix those issues: mvdnes/spin-rs#66
The new implementation has been reviewed by @xacrimon.

@64
Copy link

64 commented Aug 27, 2019

FWIW, I had a quick look over the other parts of spin and didn't see any glaring issues. If someone is going to take a proper look I'd recommend auditing Once because that's what lazy_static uses.

@Shnatsel
Copy link
Member Author

Shnatsel commented Sep 4, 2019

Conversion of Once to MaybeUninit<T> is outstanding: mvdnes/spin-rs#68

The rest of Once could still use a soundness audit.

@xacrimon
Copy link

I've looked through and tested Once as rigourusly as my knowledge allows and I have found no issues.

@Shnatsel
Copy link
Member Author

Great! If the code isn't extensively commented already, it would be nice to add comments in the form of "This is sound because..."

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

3 participants