• Kirill Tkhai's avatar
    clone_noasan: Allow to create CLONE_VM|CLONE_VFORK processes · ef65d98a
    Kirill Tkhai authored
    Picked from patch "[PATCH RFC] namespaces: use CLONE_VFORK
    with CLONE_VM when it is possible" by Andrew Vagin.
    
    Currenly parent touches child's stack, as in moment of clone() call
    its stack pointer is above the child's (we allocate char stack[128]
    on parent's stack). This prevents to create CLONE_VM|CLONE_VFORK
    processes, because the child uses stack addresses occupied by parent.
    
    The patch changes clone_noasan() behaviour and allows to do that
    with the same memory consumption. We give a child memory, which
    is not used by parent clone(), so parent's and child's stacks
    have no tntersection.
    
    This allows to create CLONE_VM|CLONE_VFORK processes.
    Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    ef65d98a
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr 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.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...