[CRIU] [PATCH 7/8] restore: Add restoration of alternative signal stack
Cyrill Gorcunov
gorcunov at gmail.com
Tue Jun 18 06:56:53 EDT 2013
On Tue, Jun 18, 2013 at 05:43:21PM +0400, Andrew Vagin wrote:
> > task, iow simultaneously with setting up new cs:ip. So I don't get how
> > it's related to nested signal handlers.
>
> It was off topic question.
ok
> > own signal handler, no?
> yes. But when I wrote this message I did not know that altstack is used
> only for SA_ONSTACK, so we can restore sas here.
ok, thanks!
> > In turn former blocked signals mask is restored
> > sigreturn too, thus (if only I've not missed something obvious) -- we're
> > allowed to restore sas with sigreturn help insted of explicit calling
> > for sigaltstack() system routine.
>
> So why do we call sigaltstack?
We call sigaltstack in only one case -- on dump, to fetch the value(s)
dumpee has. On restore we have 2 ways
- either call for sigaltstack explicitly in restorer.c right before
we call for sigreturn
- either pass stack value to sigreturn call and allow the kernel to
restore stack for us
I chose second way and simply tune up sigframe. Sounds reasonable?
More information about the CRIU
mailing list