[Devel] [PATCH 2/2] parasite: Don't try to start executing syscall from guard page

Pavel Emelyanov xemul at virtuozzo.com
Fri Nov 25 02:51:44 PST 2016


On 11/24/2016 07:33 PM, Cyrill Gorcunov wrote:
> On Thu, Nov 24, 2016 at 07:34:14PM +0300, Pavel Emelyanov wrote:
>> On 11/24/2016 07:16 PM, Cyrill Gorcunov wrote:
>>> On Thu, Nov 24, 2016 at 07:02:10PM +0300, Pavel Emelyanov wrote:
>>>> On 11/24/2016 06:48 PM, Cyrill Gorcunov wrote:
>>>>> When looking for place where we can do syscall we should care
>>>>> if there a guard page present. So check for it first.
>>>>
>>>> Have we found a task with executable stack?
>>>
>>> Not "stack" in classic meaning, but a special mmap which
>>> kernels treats as a stack and adds guard page. It is our test maps05
>>
>> Wait, kernel guards VMAs with MAP_GROWSDOWN, while CRIU searches for PROT_EXEC
>> areas to work on. Have our test created such a mapping? I'd fix the test, no
>> applications behave like that %)
> 
> Yes we do create such mapping and it's completely correct to applications
> to create the same mappings. In reverse, I think it's good that we have
> such test -- it is straight bug in criu, not test.

Just skip GROWSDOWN mappings when searching for syscall VMA and
don't mess with guard pages at all.

-- Pavel



More information about the Devel mailing list