• Andrey Vagin's avatar
    restore: map private vma-s before forking children (v3) · 1a9d87de
    Andrey Vagin authored
    In this case private vma-s will be inherited by children,
    it allows to restore copy-on-write reqions.
    
    This code compares child and parent vma lists. If it found
    two vma-s with the same start and end addresses, it decides
    that the child inherites this vmas from the parent.
    
    This code calculates a size of all private vma-s, then allocate
    a memory region for all vma-s and maps them one by one. If a vma is
    inherited it will be remaped to an allocated place.
    
    As a result all vma-s will be placed in a continious memory region
    and sorted by start addresses. This logic will be used for remap
    vma-s to correct address.
    
    v2: fix accoding with Pavel's comments ( clean up and simplify )
    v3: simplify code and check that VMA-s are sorted
    Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    1a9d87de
Name
Last commit
Last update
Documentation Loading commit data...
include Loading commit data...
protobuf Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Makefile Loading commit data...
Makefile.inc Loading commit data...
Makefile.pie Loading commit data...
Makefile.syscall Loading commit data...
README Loading commit data...
cr-check.c Loading commit data...
cr-dump.c Loading commit data...
cr-restore.c Loading commit data...
cr-show.c Loading commit data...
crtools.c Loading commit data...
eventfd.c Loading commit data...
eventpoll.c Loading commit data...
fifo.c Loading commit data...
file-ids.c Loading commit data...
files-reg.c Loading commit data...
files.c Loading commit data...
gen-offsets.sh Loading commit data...
image.c Loading commit data...
inotify.c Loading commit data...
ipc_ns.c Loading commit data...
kcmp-ids.c Loading commit data...
libnetlink.c Loading commit data...
log-simple.c Loading commit data...
log.c Loading commit data...
mount.c Loading commit data...
namespaces.c Loading commit data...
net.c Loading commit data...
netfilter.c Loading commit data...
parasite-head-x86-64.S Loading commit data...
parasite-syscall.c Loading commit data...
parasite.c Loading commit data...
pie.lds.S Loading commit data...
pipes.c Loading commit data...
proc_parse.c Loading commit data...
protobuf.c Loading commit data...
pstree.c Loading commit data...
ptrace.c Loading commit data...
rbtree.c Loading commit data...
restorer.c Loading commit data...
shmem.c Loading commit data...
signalfd.c Loading commit data...
sk-inet.c Loading commit data...
sk-packet.c Loading commit data...
sk-queue.c Loading commit data...
sk-tcp.c Loading commit data...
sk-unix.c Loading commit data...
sockets.c Loading commit data...
syscall-common-x86-64.S Loading commit data...
syscalls-x86-64.sh Loading commit data...
sysctl.c Loading commit data...
tty.c Loading commit data...
util-net.c Loading commit data...
util.c Loading commit data...
uts_ns.c Loading commit data...