-
Notifications
You must be signed in to change notification settings - Fork 285
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
CA-391656: OCaml C stubs: release runtime lock around all xenctrl calls #4916
base: master
Are you sure you want to change the base?
CA-391656: OCaml C stubs: release runtime lock around all xenctrl calls #4916
Conversation
This PR has been open for more than a year with 0 comments. |
I should fix the conflicts here, and run the static analyzer. I'll keep the PR open meanwhile though. |
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.
This needs to be updated, as above.
Most of these calls pass only integers or pointers allocated in C, so it is safe to release the OCaml runtime lock. Replace direct passing of Xfm_val/Caml_ba_data_val with storing in a temporary local variable (the result of Xfm_val or Caml_ba_data_val won't move since they are C pointers, but the OCaml value passed in as params to these macros might!) Signed-off-by: Edwin Török <[email protected]>
…e blocking section where possible unshadow is not thread safe, but the other ones should be. TODO: double check all C API calls in unixpwd.c with the MT-safe portion of the manpage Signed-off-by: Edwin Török <[email protected]>
We may intend to upstream the xenctrlext stubs to Xen, so it should follow the Xen CODING_STYLE. The .clang-format here is based on a version I sent upstream that tries to follow that coding style. Signed-off-by: Edwin Török <[email protected]>
8545741
to
24d650a
Compare
Changed the base to |
According to the OCaml manual the
|
There was a commit in the past that added enter/leave around all stubs, however since then more stubs got added, and not all of them released the runtime.
This is opened as draft, since it is a riskier change that needs a bit more stress testing too (not just a BST), and potentially also an improved static analyzer.
This PR builds on top of the C stub bugfix PR
Review only these 3 commits here: