- 07 Apr, 2016 9 commits
-
-
Kirill Tkhai authored
Since AIO ring is never pre-dumped, it never has a parent in pre-dump. Make generate_iovs() to know this. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Description: 1)Create io context, submit several io operations and get events of some of them. 2)Sleep on signal. 3)Check tail, head and nr events restored correct. 4)Emit one more io operation. 5)Check tail has moved one number forward (i.e. synchronize in-kernel and userspace tails if they were different). Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Check nr in aio header during dump and correctness of tail, head and nr during restore. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
1)Dump/restore mmaped aio ring like any other private vma entry, with the only exception we do not predump it. 2)Create io context, set head and tail using write to /dev/null. 3)Copy aio ring restored in (1) to created in (2). 4)Remap (2) to address of (1). Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Move the declaration from .c to header file. Also rename parasite_check_aios() since we have one more function with the same name. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Adrian Reber authored
The page server already knows how to create a TCP server and client. The code has been hidden behind static-s in page-xfer.c. This commit moves the common TCP server/client code to util.c to be able to also use it in the upcoming remote lazy-server/lazy-client userfaultfd enhanced criu. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 04 Apr, 2016 28 commits
-
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Impact: no functional changes, cleanup. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Impact: no functional changes, cleanup. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Impact: no functional changes, cleanup Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Add checks that structure end is inside memory area [mem, mem + size] before dereferencing structures. Otherwise, for example, vdso_fill_symtable will try to dereference ehdr members even with vma size 0. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Impact: drop additional casts all around. Cleanup. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Impact: refactor Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
As I am here to fix some things, I would like to remove UB-based pointer compare (6.5.8.5). We have -fno-strict-aliasing in pie CFLAGS, but it even looks nicer and more readable with uintptr_t. Impact: refactoring Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Add Elf32 types and wrap them with Elf64 into some more generic types. This is for parsing vDSO from image file. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Right now we get SOL_TCP.TCP_INFO option twice, but one time is enough. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
This is prerequisite for the next patch and, actually, for the libsoccr :) Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Parasite should cleanup after fauilure and remove read-protection from VMAs. Check it with maps00 test & fault injection. Tested on travis with some addition: python test/zdtm.py run -t zdtm/static/maps00 --fault 3 --keep-going --report report -f h || false https://travis-ci.org/0x7f454c46/criu/jobs/119252291 Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
It's just a cleanup to get rid of in-function {<code>} block. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
By default criu tries to create parasite mem with memfd syscall, which is present in many systems. Let's check also the legacy way. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
The plan is to allow ->collect callbacks to read more stuff from image files. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
With autofs patches we've merged a small engine that allows to queue random routine for post-prepare execution. Re-use this for unix sockets' interconneting routine. Also this is a tiny optimization -- when we don't have unix sockets to interconnect we don't make extra list walk. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Consider when there is a double fork of helpers or zombies, e.g. when a zombie has a session id which doesn't match its pid. If the child dies and exits before the grandchild, the grandchild reparents to init, and when the task dies init doesn't have it in the helper list, so init dies as well, viz. the log below. (00.118789) Add a helper 293 for restoring SID 293 (00.118792) Attach 294 to the temporary task 293 ... (01.394403) 294: Restoring zombie with 0 code ... pie: Task 294 exited, status= 0 (01.434279) Error (cr-restore.c:1308): 12097 killed by signal 19 (01.434420) Error (cr-restore.c:1308): 12097 killed by signal 19 (01.450258) Switching to new ns to clean ghosts (01.450324) Error (cr-restore.c:2138): Restoring FAILED. Let's have the helpers reap their children before they exit to avoid this. v2: block SIGCHLD when waiting on helpers so that it doesn't race with the SICGHLD handler v3: * only helpers should collect their children, zombies can't have kids * don't double decrement nr_tasks in zombie case Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
The following error happens when building CRIU on Fedora 22: CC autofs.o autofs.c: In function ‘autofs_mount’: autofs.c:892:9: error: implicit declaration of function ‘add_post_prepare_cb’ [-Werror=implicit-function-declaration] ret = add_post_prepare_cb(autofs_add_mount_info, mi); ^ cc1: all warnings being treated as errors Adding forward declaration of add_post_prepare_cb resolves the issue. Signed-off-by:
Mike Rapoport <rapoport@il.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Stanislav Kinsburskiy authored
Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Stanislav Kinsburskiy authored
Autofs restore needs to create some shared data structures to be able to pass data to actual autofs master. But on mount restore stage shared data is not configured yet. This list of objects and their actors is processed after all mounts and shared data are restored to let autofs to create the objects. Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 01 Apr, 2016 3 commits
-
-
Tycho Andersen authored
Before the nsroot= mount option, we were just getting lucky because the cgroup superblocks "matched" when inspecting them from userspace, so we were actually getting a bind mount from the host when migrating from within cgroup namespaces. Instead, let's actually do a new (i.e. not a bind mount) for cgroup namespaces. For this, we need two things: 1. to prepare the cgroup namespace (and thus the cgroups) before the mount ns, so when the mount() occurrs it is relative to the right cgroup path. 2. not reject cgroup filesystems with no root. A cgroup ns mount looks like: 223 222 0:22 /lxc/unpriv /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd,nsroot=/lxc/unpriv i.e. it has /lxc/unpriv as its root, and thus doesn't look rooted to CRIU. We use the fstype->parse hook to rewrite this root to /, since it is handled by the cgroup ns infrastructure. v2: add new fstype->munge hook, allowing fstypes to munge their parsed mountinfo entries if they want to. this allows us to get rid of the ugly hacks with FSTYPE__CGROUP everywhere in teh patch. v3: s/fstype->munge/fstype->parse for FSTYPE__CGROUP Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
The target has been broken for some time without complaints from users. https://lists.openvz.org/pipermail/criu/2016-March/026525.html Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
To link dynamic libs (libcompel for example). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-