- 01 Oct, 2013 9 commits
-
-
Andrey Vagin authored
We are going to replace pid on id in names of image files. The id is uniq for each namespace, so it's more convient, if image files are opened per namespace. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We are going to replace pid on id in names of image files. The id is uniq for each namespace, so it's more convient, if image files are opened per namespace. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It's preparation to replace pid on id in image names. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently all values of constants should be continuous, because cr_fdset_open is used for opening images for all namespaces. The next patches will rework this code and image files will be opened per namespace, then all these ugly settings of one constant to another will be removed. 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
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently we catch processes on the exit point from sigreturn. If a task must be restored in the stopped state, we can send SIGSTOP before detaching from it. v2: add more descriptive comment about skipping SIGSTOP in ptrace.c Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently we take pid and core from it and we are going to take state. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 30 Sep, 2013 2 commits
-
-
Andrey Vagin authored
The kernel notifies about leaving syscall before starting to deliver signals. If you don't believe me, pls look at arch/x86/kernel/entry_64.S: int_ret_from_sys_call syscall_trace_leave do_notify_resume Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Everything in the sk-unix.c is ready for seq-packet sockets. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 27 Sep, 2013 4 commits
-
-
Pavel Emelyanov authored
In case criu and dumpee live in the same mount namespace there's no need in getting ns' root from init task. We can get it from criu and (!) void the root == "/" check, required for namespace case. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
No failures should occur after sigchld restore. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We cannot fail at that late stage, as everything is restored and running. In the worst case (unmap fails) restored task would have one extra mapping. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We can restore task's pgid which is not equal to its pid, only when the respective group leader is alive. To make restore reliable we wait for all group leaders to restore using separate restore stage. It's better to optimize this -- each task has a pointer on its group leader and waits for one to become such. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 25 Sep, 2013 8 commits
-
-
Pavel Emelyanov authored
If a task opens a file, then goes chroot, CRIU should still be able to dump and restore the now-invisible file. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
First of all, this should be done strictly after we've stopped accessing files by their paths, even absolute. This place is right before going into restorer. And the second thing is that we want to re-use the open_fd_by_id engine, since it handles various tricky cases of open-file-by-path. And since there's no such thing as fchroot(int fd), we emulate it using the /proc/self/fd/ links. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We restore chroot before doing this, so if we might need to open one, we may have no access to the /proc/... paths. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Make it ready for root dir restore: * fix comments * rename variables * tune error paths 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>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 26 Sep, 2013 1 commit
-
-
Alexander Kartashov authored
The register R12 has a special meaning when syscalls are hooked with ptrace() in ARM that results in a dumpee context corruption on an injected blob unmap. Note that this patch doesn't solve the problem entirely since the compiler may corrupt the register before issuing a call to the routine sys_munmap(); however we assume that a sufficiently decent compiler doesn't. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Tested-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 19 Sep, 2013 5 commits
-
-
Pavel Emelyanov authored
The print_data helper may access symbols beyond the buffer range and would thus print trash. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is preparation for the next patch. 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>
-
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 2 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>
-