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

sigaltstack #16

Open
stephenrkell opened this issue May 11, 2021 · 1 comment
Open

sigaltstack #16

stephenrkell opened this issue May 11, 2021 · 1 comment

Comments

@stephenrkell
Copy link
Owner

I haven't tested it but am pretty sure programs using sigaltstack will screw with one or more things.

@stephenrkell
Copy link
Owner Author

stephenrkell commented Aug 6, 2021

Indeed our stack-copying hack in do-syscall.h assumes we can copy all the way back from the current top-of-stack to the trap site's top-of-stack (marked by the saved stack pointer in the signal frame). If we're not on the same stack, that's a problem.

We can easily split that case off. It gets interesting on the return path though. Currently we do two sigreturns for each clone()-servicing trap, which is pretty wacky. Probably the way to handle it is to overwrite pretcode in the child's sigframe, to instead use a fake restorer that doesn't do sigreturn. We can do that before the child is spawned.

Again remember that trap/signal-based handling needs to go away anyway, so don't spend too much time on this.

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

1 participant