-
Notifications
You must be signed in to change notification settings - Fork 43
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
data races in mirage-crypto #220
Comments
Hi, I'm not really aware about domains and multicore stuffs in Ocaml5, so I may be wrong here, but for the DES item, couldn't using the |
I'm not sure storing the keys in thread-local storage is a good path, as keys from different domains won't be shared :( Maybe using a mutex approach would be better? |
Using TLS was the first idea I had for continuing to use global buffers but not sharing them between domains. Currently the use of these global buffers is correct, even taking Using a mutex would have a very significant impact on performance. |
uhm, hold on... maybe we can find some DES code that doesn't use global data (and has a public domain license)? Or modify the code that is part of mirage-crypto to get the key structures passed explicitly? |
See #223 for DES without global state |
your |
nevermind, I'll pick those up and push to 223 :) |
Thanks for the cherry picking work! |
At the time being, there are two things to consider:
mirage-crypto
#186 for inspiration) Use an atomic instead of a reference to be domain-safe #221The text was updated successfully, but these errors were encountered: