- 02 Sep, 2013 2 commits
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Aug, 2013 2 commits
-
-
Pavel Emelyanov authored
Linked remap is implemented already. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 30 Aug, 2013 18 commits
-
-
Andrey Vagin authored
pr_perror uses errno, which is set by glibc wrappers. In pi return codes of syscalls should be printed Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
When tests are executed concurrently all of them use the same root, so libraries must be copied atomically. Without this patch we can get errors like this: cp: cannot create regular file ‘/tmp/criu-root.m45u5Y/lib64/ld-linux-x86-64.so.2’: File exists Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Use decode_pointer() to convert a virtual address into a native pointer. 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
* check shared and slave mounts * check bind-mounts Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently we check that all shared mounts have identical set of children and that Each non-root mount has a proper root mount. v2: check that nobody is overmounted check a tree before trying to restore it. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
A non-root mount is bind-mounted from a proper root mount. Non-root mount without root mount is not supported yet Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The idea is simple. If a mount can't be mounted now, we will try to mount it later. v2: don't wait slaves, they are unmounted anyway v3: add a comment in do_bind_mount to explain restoring of shared groups 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
A few sentences, which are required for understanging this patch 2a) A shared mount can be replicated to as many mountpoints and all the replicas continue to be exactly same. 2b) A slave mount is like a shared mount except that mount and umount events only propagate towards it. 2c) A private mount does not forward or receive propagation. All rules is there Documentation/filesystems/sharedsubtree.txt If it's a first mount in a group, all group members should be bind-mounted from this one. Each mount propagates to all members of parent's group. The group can contains a few slaves. Mounts, which have propagated to slaves, are unmounted, because we can't be sure, that they propagated in real life. For example: mount --bind --make-slave /share /slave1 mount --bind --make-slave /share /slave2 mount /share/test umount /slave2/test mount --make-share /slave1/test mount --bind --make-share /slave1/test /slave2/test 41 40 0:33 / /share rw,relatime shared:28 - tmpfs xxx rw 42 40 0:33 / /slave1 rw,relatime master:28 - tmpfs xxx rw 43 40 0:33 / /slave2 rw,relatime master:28 - tmpfs xxx rw 44 41 0:34 / /share/test rw,relatime shared:29 - tmpfs xxx rw 46 42 0:34 / /slave1/test rw,relatime shared:30 master:29 - tmpfs xxx rw 45 43 0:34 / /slave2/test rw,relatime shared:30 master:29 - tmpfs xxx rw /slave1/test and /slave2/test depend on each other and minimum one of them doesn't propagate from /share/test v2: use false and true for bool Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Try to restore mounts while a postpone list isn't empty and check that each iteration has some progress, otherwice it will fails for preventing infinite loops v2: rework logic about postpone list add more comments v3: one more attempt to make it more readable v4: Here is a master class from Pavel how to write self-documented code. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
They are required for restoring shared and slave mounts v2: use the same names of variables in image and in code Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
All shared mounts from one group are connected to circular list. All slave are added into the proper master list. v2: change variable name and fix a bug about adding shared mounts in a circular list. v3: handle errors of collect_shared 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
It's a special case, because if we've split the stack vma, only the lowest one has the guard page. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
In /proc/pid/maps grow-down VMA-s are shown without guard pages, but sometime these "guard" pages can contain usefull data. For example if a real guard page has been remmaped by another VMA. Let's call such pages as fake guard pages. So when a grow-down VMA is mmaped on restore, it should be mapped with one more guard page to restore content of the fake guard page. https://bugzilla.openvz.org/show_bug.cgi?id=2715Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The kernel logic is described in v2.6.36-rc1-161-g7798330: "If we've split the stack vma, only the lowest one has the guard page." https://bugzilla.openvz.org/show_bug.cgi?id=2715Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Aug, 2013 6 commits
-
-
Andrey Vagin authored
The current scheme is racy. It use open_detache_mount in a current name-space. If a mount namespace is created by someone else between mount and umount(detach) in open_detache_mount, the mount will be propagated in the new mntns, then it is detached in a current ns and rmdir fails, because it's still mounted in athother mntns. This patch creates a new mount namespace for mounting sysfs. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Currently pos has type unsigned long, so its size depends on architecture. pos is saved as 64-bit value in the image file and it isn't restored, if it is equal to -1. Due to convertation on 32-bit platforms -1 is converted into UINT_MAX and we get error on restore. $ zdtm.sh ns/static/tun ... (00.398513) 5: Error (files-reg.c:534): Can't restore file pos: Illegal seek (00.398888) 5: Error (files-reg.c:489): Can't open file /dev/net/tun: Illegal seek ... id: 0x15 flags: 0x2 pos: 0x000000ffffffff fown: { uid: 0 euid: 0 signum: 0 pid_type: 0 pid: 0 } name: "/dev/net/tun" crtools is compiled with _FILE_OFFSET_BITS=64, so off_t is always 64-bit. Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We're generating library now, lets don't track it. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need to reuse this code in criu library, where libc calls are present thus we will be compiling it in shared mode. Because internal syscalls library won't be needed we wrap them with __sys macro which would hide the details of invocation depending on CR_NOGLIBC preprocessor variable passed from command line. Original-patch-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's not a problem now but in future we might need some special flags to be passed here. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Aug, 2013 12 commits
-
-
Pavel Emelyanov authored
Tun files are attached to tun links, thus we need the latter to be dumped together with the former. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Reading from NetDeviceEntry directly is not safe and may cause buffer overflow. Use stlcpy helper. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Same as kernel provides, adopted from Linux sources. strlcpy is similar to strncpy but _always_ adds \0 at the end of string even if destination is shorter. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
The kernel was compiled without the tun driver. This reverts commit 889a2129. Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
setuid and setgid drops the dumpable flag, so it should be set back. Otherwise proccesses will not able to read a few files in proc (e.g. /proc/pid/pagemap). This patch affects cow01: 11:50:04.429: 4: ERR: cow01.c:99: Unable to read data (errno = 13 (No such file or directory)) v2: typo fix 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>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This reverts commit 21d94e00. This patch was created for investigating https://bugzilla.openvz.org/show_bug.cgi?id=2676 The bug is fixed and this patch does nothing useful, because tcpdump starts too late. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
(00.023059) 3898: Error (page-read.c:129): Can't read mapping page -1: Bad address Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
This patch fixes running into loop and data loss, when dumping semi-closed unix stream connection. patchv2 has error check, that was missed in v1. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-