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
Miscellaneous syscalls to support running Tor #1075
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1075 +/- ##
==========================================
- Coverage 55.04% 54.98% -0.06%
==========================================
Files 130 133 +3
Lines 19586 19772 +186
Branches 4676 4711 +35
==========================================
+ Hits 10781 10872 +91
- Misses 6045 6111 +66
- Partials 2760 2789 +29
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Oh I see I should enable the |
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.
Looks good!
During a meeting we discussed a few limitations of the signal support. The plan is just to document these for now.
- There's a minor issue of causality when using the native Linux signal functionality rather than implementing signals as events/tasks, but this shouldn't be important since only one process/thread per host can be running at once.
- If the plugin uses the
SIGSTOP
orSIGCONT
signals, it could cause issues for ptrace mode. - In preload mode, this could cause issues for plugins that have syscall handlers. If process A sends a signal to process B, process B which is not currently running (and is waiting on a syscall) will receive the signal and start running the signal handler. The signal handler may make a syscall which gets intercepted by Shadow, and Shadow will try to make a second syscall while it's already processing the first one and will result in an error/crash.
- In preload mode, even if there is no signal handler registered, if the shim is waiting for a message from a Shadow worker (the shim is waiting on the semaphore), a signal will interrupt the wait and Shadow will continue as if the semaphore wait has finished when it hasn't.
Another option for dealing with signals is to only allow processes to send signals to themselves, which is the approach taken in the "Reproducible Containers" paper. |
No description provided.