- 31 Jul, 2015 5 commits
-
-
Cyrill Gorcunov authored
In case if socket's cwd lays on nested mount point we might resolve its path a bit incorrectly (mount_resolve_path helper should not obtain paths with leading dot). Thus send a path without leading dot for correct name resolving. Also add some error messages. 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>
-
Ruslan Kuprieiev authored
In this mode libcriu will execute criu binary in swrk mode, so users are not always obliged to run criu service daemon. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 30 Jul, 2015 4 commits
-
-
Cédric Bosdonnat authored
Use CRTOOLSVERSION instead of GITID to write criu.pc version. With GITID, criu.pc had version '0' when built from tarballs. Signed-off-by:
Cédric Bosdonnat <cbosdonnat@suse.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Make sure we don't pass any trash value here, because the kernel does copy it explicitly. We allocate the memory for frame as zero filled but stack segment is special and zero is not acceptable (we've had a discussion on LKML if we need a special handling for zero ss but end up that new kernels need new CRIU version, upon which all agreed). Finally in commit 296bbf7e I managed to hit exactly this problem :) Reported-by:
Andrey Wagin <avagin@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrey Wagin <avagin@gmail.com> 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
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Jul, 2015 7 commits
-
-
Christopher Covington authored
Also remove the cast of a pointer-to-void variable to the type it already is. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Make it more readable. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Artem Kuzmitskiy authored
* Added test for dumping\restoring of unnamed unix sockets. Also test added to test/Makefile. Use make run for launch. * Cleanup env after call run.sh in test/libcriu. Signed-off-by:
Artem Kuzmitskiy <artem.kuzmitskiy@lge.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Artem Kuzmitskiy authored
Added functionality for restoring unnamed unix sockets using already implemented feature - inherit fd and using same command line option. Usage example: criu restore -d -D images -o restore.log --pidfile restore.pid -v4 \ -x --inherit-fd fd[3]:socket:[9677263] Signed-off-by:
Artem Kuzmitskiy <artem.kuzmitskiy@lge.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Artem Kuzmitskiy authored
* Added functionality for dumping unnamed unix sockets. When we call CRIU with dump option, for unnamed socket we should pass it inode into --ext-unix-sk. Details about this problem described in http://criu.org/External_UNIX_socket#What_to_do_with_socketpair.28.29-s.3F. Usage example: criu dump -D images -o dump.log -v4 --ext-unix-sk=4529709 -t 13506 * fix typo error in log output Signed-off-by:
Artem Kuzmitskiy <artem.kuzmitskiy@lge.com> 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
Unix sockets may be created with non-absolute (relative) path (when kernel creates one it always use AT_FDCWD for name resolving), So when we collect sockets we see them as having names without leading slash. In common cases for such sockets application doesn't change own working directory after that but this is not always the true. So we need to invent some name resolver. The good candidate is IRMAP cache but after a number of testings I found that it might slow down performance very dramatically. Thus we need some more intelligent way here. For a while, for common applications such as postfix, fetching dumpee working directory and root is enough. So here what we do - when socket get collected from diag interface we remember its relative name parameters (device and inode) but postprone name resolving to not bring perf penalty until really needed - when we meet a socket to dump with relative name assigned we try to use $cwd/name and $root/name for this socket to check if it has been created in those directories. On success we simply remember the directory in image and when restore such socket call for chdir helper to change working dir and generate relative name v2: - Use new unlink_stale to remove sockets we're to restore - Use *at() helpers once we're changed working dir in bind_unix_sk - Add more debug ouput Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Jul, 2015 13 commits
-
-
Cyrill Gorcunov authored
It gonna be extende to support relative names. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
For grepability sake. 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>
-
Tycho Andersen authored
In the case where there were multiple clients for a dgram socket, we were restoring the queue for each client. Instead, we should pick one client and she should restore the queue while the rest skip it. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
The old and new address parameters passed to the mremap system call must be page size aligned. On AArch64, the page size can only be correctly determined at run time. This fixes the following errors for CRIU on AArch64 kernels with CONFIG_ARM64_64K_PAGES=y. call mremap(0x3ffb7d50000, 8192, 8192, MAYMOVE | FIXED, 0x2a000) Error (rst-malloc.c:201): Can't mremap rst mem: Invalid argument call mremap(0x3ffb7d90000, 8192, 8192, MAYMOVE | FIXED, 0x32000) Error (rst-malloc.c:201): Can't mremap rst mem: Invalid argument Signed-off-by:
Christopher Covington <cov@codeaurora.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
This fixes the following error for CRIU on AArch64 kernels with CONFIG_ARM64_64K_PAGES=y. Error (cr-restore.c:2828): Can't mmap section for restore code This occurred because the address being requested (0x16000 in one case) was not page aligned. Also change the capitalization of the pie_size() macro to make it clear that the value is not necessarily a build-time constant. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We use native cpuid, so this one is no longer used. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
Add checkpoint and restore of the Altivec and VSX registers. Currently we rely on the return value of ptrace to detect if the CPU is supporting these features or not. In the future, we should rely on the AT_HWCAP vector and check feature at restart time. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Use hex output for the whole module with proper 0x prefix. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This will help to support compat mode in the future. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Artem Kuzmitskiy authored
This patch adds capability to using libcriu from C++ code. Signed-off-by:
Artem Kuzmitskiy <artem.kuzmitskiy@lge.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 24 Jul, 2015 2 commits
-
-
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>
-
- 23 Jul, 2015 7 commits
-
-
Tycho Andersen authored
When a TASK_HELPER would exit just before a zombie, sometimes the signal would get coalesced, and we would miss the zombie exit, causing us to block forever waiting for the zombie to complete. Let's use an entirely different strategy for waiting on zombies: explicitly wait on them with waitid, and use WNOWAIT to prevent their data from actually being reaped. v2: don't decrement nr_{tasks,threads} in the loop Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
We'll use this in the next patch for collecting the zombies without actually waiting on them. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
This saves some keystrokes and is equivalent to decode --pretty. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Don't heat a planet! :) Cc: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In criu 1.6 if no --manage-cgroups option been specified we still restore default (known) properties. But in commit c7d646af we've enhanced its semantics occasionally break backward compatibility: if no --manage-cgroups passed at all it's assumed that one asks to not touch cgroups at all on restore. To restore old behaviour setup "soft" mode by default. Reported-by:
Andrew Vagin <avagin@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@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 required for zdtm/live/static/different_creds cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -iquote ../../lib/arch/x86/include -I../../lib -c -o different_creds.o different_creds.c different_creds.c:7:28: fatal error: sys/capability.h: No such file or directory Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 21 Jul, 2015 2 commits
-
-
Ruslan Kuprieiev authored
Reported-by:
Andrew Vagin <avagin@gmail.com> Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The kernel doesnt allow to call lseek on /dev/kmsg if it has been opened with O_WRONLY mode so our restore procedure fails. Thus if we meet a file which fits the condition above -- set it's position to predefined value which tells criu to not call lseek on restore. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-