[CRIU] [PATCH 3/3] cr-exec: initialize kdat.task_size on criu exec

Dmitry Safonov dsafonov at virtuozzo.com
Wed Jul 6 07:40:10 PDT 2016


On 07/06/2016 04:48 PM, Dmitry Safonov wrote:
> For `criu exec` we are searching for a place for syscall injection.
> While searching for a VMA with PROT_EXEC and with needed size,
> we check that VMA is lower than task_size.
> The callpath for it is:
> cr_exec => parasite_prep_ctl => get_vma_by_ip
>
> Firstly, I thought to omit kdat.task_size checking if it's not inited:
>> if (vma_area->e->start >= kdat.task_size && kdat.task_size)
> but I think it's a hack then a proper solution.
> Besides, this code still can choose VMA over task_size on ARM
> and try to inject syscall there (IIRC, ARM has kernel-mapped
> VMA in that area).
>
> So, lets init kdat.task_size for `criu exec`.

I'll send v2 for this patch.
Need also init compat feature in cr-exec.


More information about the CRIU mailing list