- 19 Sep, 2013 3 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 24 Sep, 2013 9 commits
-
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Original-patch-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Original-patch-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
I don't know a reason, when accept() fails once and then goes back to normal work. Cc: Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
v2: remove exit() Cc: Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 23 Sep, 2013 19 commits
-
-
Andrey Vagin authored
This vma looks like VSYSCALL on x86. We don't need to dump and restore it. Currently this vma is dumped and restored as a private vma, but it is not remmaped in a correct place: Restore --- dump/pipe00/6392/1/dump.maps 2013-09-23 12:49:19.436816192 +0000 +++ dump/pipe00/6392/1/restore.maps 2013-09-23 12:49:20.276766356 +0000 @@ -6,5 +6,6 @@ e05000-e26000 4009d000-4009f000 400a0000-400aa000 400b8000-401e7000 +b6d6f000-b6d70000 be838000-be859000 ffff0000-ffff1000 ERROR: Sets of mappings differ: Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This patch detects the race, when a signal hanler could be executed during restore. More details are in: 5d18eca3 restorer: Block signals early Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Some VMA-s can be merged on restore. For example, If a process maps VMA1, VMA2 and then VMA3 between the previous ones. |VMA1|VMA3|VMA2| The VMA3 will be merged only with VMA1, but all three VMA-s will be merged on restore, because they are mmaped in a correct order VMA1, VMA3, VMA2. Due to this issue, we have a small script for merging continuous VMA-s. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
All process VMA-s are in "premmaped area". All restorer stuff are in bootstap "area", so we have two areas. So we don't need to unmap extra VMA-s one by one. We can call munmap three times for the region before the first area, for the hole between areas and for the region after the second area. The old scheme didn't work, because the list of VMA-s can be changed after collecting. It can be due to memory allocations by libc or due to increased stack. v2: improve readability at the expense of beautiness v3: print return code of munmap in error messages Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This patch adds a new parasite command, which unmaps the parasite blob. This command never returns and the criu process traps the target process on the exit from the munmap syscall. v2: rename the function for unmaping a parasite blob to not intersects with criu's functions. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This patch adds a function for removing the restorer blob. This function never returns and the process must be trapped on the exit from the munmap syscall. v2: * release parasite_ctl sturcture and use the new interface of parasite_prep_ctl Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
A task is stopped here for unmaping restorer blob and restoring a state. The method is the same as for parasite. CRIU attaches to processes via ptrace and start to trace all syscalls. v2: don't use a software breakpoint v3: stop all thread on the exit from sigreturn v4: attach to each thread Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We are going to check is it valid or not. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
parse_thread allocated a buffer for threads and then it initialized read pid for each thread. Now we want to use it on restore and in this moment we already have a buffer with initialized virt pid-s, so we need to initialize read pid-s only. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It will be used in cr-restore.c for stopping threads on the exit from sigreturn. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The munmap syscall must be executed from a process memory. The code can be injected in memory and then removed. But we can avoid all these actions, if the code will be in the blob and a process will be trapped on the exit from the munmap syscall. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This feature will be used for unmaping restorer blobs. All reqired code will be in the blob. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
All processes must be started by PTRACE_SYSCALL. The function calls wait in a loop and if a process on the exit from the required syscall, it is stopped, otherwise it will be reexecuted by PTRACE_SYSCALL. The function doesn't know, which processes should be trapped, so you should care, that wait() will not catch someone else. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This patch adds nothing new, just splits the existant function. Currently a parasite stopped on sigreturn for unmaping a parasite blob. The same scheme will be used for restorer blob and this function will be used to stop on exit from the munmap syscall. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
For the root task the clone syscall returns the pid in criu's pidns, but for other processes the clone syscall returns PID in the restored namespace. The /proc/self link contains the PID value of the current process, so if we want to determing the PID in a criu's pidns, we should use criu's /proc. v2: readlink() does not append a null byte to buf, so we must do that Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
A pstree item will contain pid and state. Both these properties will be determined after creating processes and will be used from the controlling proces. v2: fix the error path Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Original-patch-by:
Andrey Vagin <avagin@openvz.org> Original-patch-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 20 Sep, 2013 1 commit
-
-
Andrey Vagin authored
Otherwise threads can handle them before calling sigreturn with wrong (not belonging to crtools, but to the target task) handers: __export_restore_task | __export_restore_thread restore_finish_stage(CR_STATE_RESTORE); | restore_finish_stage(CR_STATE_RESTORE); sys_sigaction(SIGCHLD, &args->sigchld_act, ...) | restore_signals() | ksigfillset(&to_block); | sys_rt_sigqueueinfo(sys_getpid(), ...); | | execute signal handler() <------ BUG !!! | restore_signals() | ksigfillset(&to_block); Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 18 Sep, 2013 1 commit
-
-
Cyrill Gorcunov authored
For debug purpose. | (00.013002) 1: Restoring link lo type 1 | (00.013002) 1: Restoring netdev lo idx 1 | (00.015002) 1: Restoring link venet0 type 4 | (00.015002) 1: Restoring link eth0 type 2 | (00.015002) 1: Restoring netdev eth0 idx 3 Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 Sep, 2013 4 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We was going to block a connections in both directions (v0.6-97-g0a1b70bb), but both iptable rules are added in the INPUT table. It's wrong, because the rule must be added to the OUTPUT table to block locally-generated packets Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
SO_SNDBUF and SO_RCVBUF sets a double input value, because "Linux reserves half of te socket buffer for metadata." So if a process is suspended/restored many times, a socket buffer size is doubled on each iteration and in a one moment it is overflowed. Very likely the program hangs in such situation, because the socket with negative buffer size is unusable. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kolesen authored
An error occurs when trying to build crtools on ARM systems with perl versions earlier than 5.13.2 due to lack of /r modifier. % make ... GEN arch/arm/syscalls.S Bareword found where operator expected at arch/arm/gen-syscalls.pl line 8, near "s/.*include\///gr" Bareword found where operator expected at arch/arm/gen-syscalls.pl line 10, near "s/.*include\///gr" Bareword found where operator expected at arch/arm/gen-syscalls.pl line 13, near "s/.*include\///gr" Bareword found where operator expected at arch/arm/gen-syscalls.pl line 16, near "tr/.-/_/r" Bareword found where operator expected at arch/arm/gen-syscalls.pl line 17, near "tr/.-/_/r" syntax error at arch/arm/gen-syscalls.pl line 8, near "s/.*include\///gr" syntax error at arch/arm/gen-syscalls.pl line 10, near "s/.*include\///gr" syntax error at arch/arm/gen-syscalls.pl line 13, near "s/.*include\///gr" syntax error at arch/arm/gen-syscalls.pl line 16, near "tr/.-/_/r" syntax error at arch/arm/gen-syscalls.pl line 17, near "tr/.-/_/r" BEGIN not safe after errors--compilation aborted at arch/arm/gen-syscalls.pl line 60. make[1]: *** No rule to make target `arch/arm/syscalls.S', needed by `arch/arm/syscalls.o'. Stop. Signed-off-by:
Alexander Kolesen <kolesen.a@gmail.com> Acked-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 16 Sep, 2013 3 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
When service/page server becomes daemon, we may need to know it's pid. Signed-off-by: Ruslan Kuprieiev<kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-