[CRIU] [PATCH 7/8] restore: Add restoration of alternative signal stack
Andrew Vagin
avagin at parallels.com
Tue Jun 18 07:37:17 EDT 2013
On Tue, Jun 18, 2013 at 06:29:52PM +0400, Cyrill Gorcunov wrote:
> On Tue, Jun 18, 2013 at 06:15:58PM +0400, Andrew Vagin wrote:
> > >
> > > 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
> > You use this way in these patches.
> > >
> > > - 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?
> > You are going to implement the second way...
> >
> > I vote for the second way too.
>
> Nope :-)
Sorry, it's my fault. Yes, it looks good for me.
>
> [patch dump: Add dumping of alternative signal stack]
>
> init_thread
> ...
> ret = sys_sigaltstack(NULL, &args->sas);
> ...
>
> init
> ...
> ret = sys_sigaltstack(NULL, &args->sas);
> ...
>
> [patch restore: Add restoration of alternative signal stack]
>
> __export_restore_task
> ...
> if (args->has_sas)
> setup_sas(rt_sigframe, &args->sas);
>
> construct_sigframe
> ...
> setup_sas(sigframe, core->sas);
>
> ie explicit sys_sigaltstack are only on dump. restore simply
> tunes up sigframe but doesn't call for sys_sigaltstack.
More information about the CRIU
mailing list