- 19 Nov, 2015 3 commits
-
-
Andrew Vagin authored
v2: use a cached value to dump ipv6 interface addesses call get_ipv6() from kerndat_init_rst too Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
It returns EINTR, so we need to handle it. $ bash test/zdtm.sh --restore-sibling ns/static/env00 ... futex(0x7fc20ec92010, FUTEX_WAIT, 1, {120, 0}) = ? ERESTART_RESTARTBLOCK (Interrupted by signal) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 Nov, 2015 17 commits
-
-
Pavel Emelyanov authored
There's a sat.py script in criu-scripts repo that analyzes the strace outputs. It's useful to check the amount of system calls criu takes to do dump or restore of certain apps. So add the --sat key to zdtm.py that would generate sat-able logs for individual tests. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Right now report looks like generic python exception about inability to copy some file. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's safer than alloca() calls. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Better to obtain error if there is no free memory than smashing the stack. A rule of thumb for alloca() based functions is to use them with predefined small sizes (such as we do in swapping builtin sizes for parasite engine). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
v2: * add another filter to the chain to test the inheritance chaining check * include zdtm.py desc file Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
v2: include zdtm.py desc file Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
v2: include zdtm.py desc file Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
v2: use a non-racy version of fork_and_ptrace_attach Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
This commit adds basic support for dumping and restoring seccomp filters via the new ptrace interface. There are two current known limitations with this approach: 1. This approach doesn't support restoring tasks who first do a seccomp() and then a setuid(); the test elaborates on this and I don't think it is tough to do, but it is not done yet. 2. Filters are compared via memcmp(), so two tasks which have the same parent task and install identical (via memory) filters will have those filters considered to be the "same". Since we force all tasks to have the same creds (including seccomp filters) right now, this isn't a problem. The approach used here is very similar to the cgroup approach: the actual filters are stored in a seccomp.img, and each task has an id that points to the part of the filter tree it needs to restore. This keeps us from dumping the same filter multiple times, since filters are inherited on fork. v2: * remove unused seccomp_filters field from struct rst_info * rework memory layout for passing filters to restorer blob * add a sanity check when finding inherited filters Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Otherwise the kernel can set it as a control terminal for the currect session and CRIU will not be able to set it as a control terminal for the target process. Reported-by:
Andrey Ryabinin <aryabinin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
v2: add comments and rename ns_created to ns_populated. Reported-by:
Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
It can be the same with a parent one and the helper will inherit all parent resources. Now we can dereference item->ids for all task. It's used in restore_task_mnt_ns, for example. Reported-by: Mr Jenkins Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
If processes share a file descriptor table, they all have their own set of service descriptors. close_old_fds() closes all file descriptors execpt service descriptors Fixes: 9d60724e ("restore: restore mntns before creating private vma-s (v3)") Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
close_olds_fds() knows nothing about more than one set of service file descriptros, so it's better to call it before forking children as it was bedore 9d60724e ("restore: restore mntns before creating private vma-s") The root task restores all processes and pin them with file descriptors, then a task restores a mount namespace by opening the file descriptor of the root task via /proc/pid/fd/X. Reported-by: Mr Jenkins Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 14 Nov, 2015 1 commit
-
-
Andrew Vagin authored
We need to open a file to restore a file mapping and this file can be from a current mntns. v2: All namespaces are resotred from the root task and then other tasks calls setns() to set a proper mntns. v3: fix comments from Pavel Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 13 Nov, 2015 7 commits
-
-
Cyrill Gorcunov authored
There might be several same terminals opened (say tty6 or whatever) which gonna look as separate files but actually pointing to the same tty kernel instance. Moreover if it's a controlling terminal we will be trying to restore it as many times as find non zero sid on a peer. Instead lets do a simple trick first: choose a leader from a terminal group and use it only for controlling terminal restoration. https://jira.sw.ru/browse/PSBM-40969Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
errno is used in open_path() Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
v2: add a file mapping from a test tmpfs mount Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Ryabinin authored
open_mountpoint() have to operate in target's mount namespace, which may differ from root's namespace - root_item->pid.real. So obtain the correct mount namespace from mount_info and use it in switch_ns(). Signed-off-by:
Andrey Ryabinin <aryabinin@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
If two ns_flavor.init() are called in parallel then all the os.mkdir() calls would end up with EEXISTS exception. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
There are tests (e.g. on locks) that can conflict with each other, so wait for all the other jobs to finish before running such. v2: Wait for the excl test to finish before launching more of them. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 12 Nov, 2015 12 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
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>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This test expects that it _will_ be C/R-ed into new hierarchy 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
This thing is new and can be absent in ip tool, which is OK and is handled by net.c code itself. 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
Otherwise they are left after test and make zdtm.py list thing these files are tests too. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-