• Dmitry Safonov's avatar
    cr-exec: initialize kdat.{task_size, has_compat_sigreturn} on criu exec · da9315d8
    Dmitry Safonov authored
    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`.
    Also lets init kdat.has_compat_sigreturn so we could exec into
    compatible applications.
    
    Cc: Christopher Covington <cov@codeaurora.org>
    Cc: Andrew Vagin <avagin@virtuozzo.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
    Reviewed-by: 's avatarChristopher Covington <cov@codeaurora.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    da9315d8
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
lib Loading commit data...
scripts Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...