- 07 Apr, 2016 14 commits
-
-
Pavel Emelyanov authored
The option was in use when we didn't have the /proc/pid/ns links and thus ns ids. Later we used it at restore time to tell which namespaces to restore the pstree into. Right now ids are always generated and this option has no effect (and meaning). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
We've been writing this file since 0.4, hopefully nobody's using such an oldie :) v2: Don't BUG_ON, but return error, as this can be triggered by corrupting images. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
This helper is used in both PIE and non-PIE code. For the second we can use normal pr_perror. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Atomic operations doesn't work for non-aligned pointers. =[log]=> dump/zdtm/static/autofs/30/2/restore.log ------------------------ grep Error ------------------------ (00.185037) 5: Error (/root/git/criu/criu/include/lock.h:78): BUG at /root/git/criu/criu/include/lock.h:78 (00.207193) Error (cr-restore.c:1407): 100 killed by signal 9: Killed (00.219187) Error (cr-restore.c:2237): Restoring FAILED. ------------------------ ERROR OVER ------------------------ 4339 futex(0x7fa79c1561da, FUTEX_WAKE, 2147483647 <unfinished ...> 4339 <... futex resumed> ) = -1 EINVAL (Invalid argument) Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
v2: copy aio00.desc Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
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 26 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>
-