[CRIU] Re: [PATCH cr 1/2] parasite: transfer pid and parasite_ctl as two separate arguments

Cyrill Gorcunov gorcunov at openvz.org
Thu Feb 16 16:26:31 EST 2012


On Fri, Feb 17, 2012 at 01:12:14AM +0400, Andrew Vagin wrote:
> On Fri, Feb 17, 2012 at 12:54:29AM +0400, Cyrill Gorcunov wrote:
> > On Thu, Feb 16, 2012 at 11:46:59PM +0300, Andrey Vagin wrote:
> > > 
> > > The next patch will use parasite for threads.
> > > parasite_ctl is the same for all threads, but pid is own for each one.
> > > 
> > > I am not sure, that it's a good decision. We can change pid in
> > > parasite_ctl to avoid add a new argument in many functions, but
> > > it looks ugly.
> > > 
> > 
> > Andrew, parasite-syscall.c was just been heavily reworked (and simplified
> > I hope), so control block carries all information needed for parasite
> > blob to run, and
> > ctl->pid should not change during we operate over parasite.
>
> I'm not sure in this sentence. Why do we need to inject parasite again,
> if we want to dump threads? We may have two control blocks: one for
> parasite code and one for "task_struct"...

Seems I wrote interrectly. The parasite control block need to carry
initial pid (ie the pid where the blobs are injected, by blobs I mean
1st blob which does syscall directly, and 2nd blob which contains
parasite engine itself). So once a victing is infected we remember
which pid it has and never change it, we use this pid to cure victim
later. Thus, you might need to extend ctl block and put additional
thread pid here.

	Cyrill


More information about the CRIU mailing list