[CRIU] [PATCH v2] compel: infect -- Don't forget to fetch sas early

Pavel Emelyanov xemul at virtuozzo.com
Mon Feb 20 00:53:08 PST 2017


On 02/20/2017 11:51 AM, Cyrill Gorcunov wrote:
> On Mon, Feb 20, 2017 at 11:40:19AM +0300, Pavel Emelyanov wrote:
>> On 02/20/2017 11:33 AM, Cyrill Gorcunov wrote:
>>> When infecting victim we construct sigframe to
>>> be able to self-rectore it in case if something
>>> goes wrong. But in case is a targer been using
>>> alternative stack for signal handling it will
>>> be missed in sigframe since we don't fetch it.
>>>
>>> Thus add fetching sas on infection stage and
>>> put it into signal frame early.
>>
>> The ciru/pie/parasite.c should stop calling sigaltstack itself
>> and get the sas from compel :)
> 
> Yes, but it is for another patch. Will try to implement today.
> Note though, that we're fetching sas for thread leader only
> and the other threads still will fetch sas'ed by own via
> parasite daemon.

Yup, makes sense. Maybe add std_get_thread_sas() call that'll
do the syscall for sub-threads and return the already read
value from sigframe?

-- Pavel



More information about the CRIU mailing list