- 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 6 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>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
to be able to use any symbols in paths Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
mountinfo contains mangled paths. space, tab and back slash were replaced with usual octal escape, so we need to replace these charecter back. v2: declare cure_path as static Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
For example: mount -t tmpfs "" test v2: don't leak memory Reported-by:
Ross Boucher <boucher@gmail.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 16 Jul, 2015 7 commits
-
-
Ruslan Kuprieiev authored
Currently, libcriu is connecting to CRIU service by itself, just asking user for a path to socket. But in some cases users need to provide fd instead path. For example, sometimes task has no access to criu socket because of strict security mesures, but is able to inherit fd from a parent that has access to criu socket. v2, use union for addr and fd Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
We only need a rpc.pb-c.h header. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
criu_opts contains rpc options and notify callback, so we can keep all options in just one structure. This will allow us to easily extend libcriu functionality and yet keep all options in one place. We're also not hiding rpc opts structure anymore, so it is pretty clear where power-user should put his own CriuOpts instance if he would like to do that. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
8ffbe754 moved the rst_mem_lock() call, but didn't move the corresponding LSM allocations, so we do that here. One unfortunate thing is that we have to split this into two steps: first we have to read the creds to figure out exactly how much memory to allocate for the lsm string. Since prepare_creds() wants to write directly to the task_restore_args struct and that can't be allocated until after we lock the restore memory, we break it up into two steps. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
We need to wait for listen() as well as bind() for internal unix sockets, or we can race like this: (00.135950) 1: Opening standalone socket (id 0xb ino 0x9422f peer 0) (00.135974) 353: Error (sk-unix.c:701): Can't connect 0x947c4 socket: Connection refused (00.136390) 1: Error (cr-restore.c:1228): 353 exited, status=1 (00.136407) 1: Putting 0x9422f into listen state (where 0x9422f is the peer for 0x947c4) This race was pretty rare for me, but I've run 1000 tests and it didn't happen so hopefully this patch fixes it :) Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@odin.com> 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
In commit c7d646af we introduced cgroup resotre modes but when option passed via RPC code it simply either true or false which erroniously maps to CG_MODE_PROPS or CG_MODE_IGNORE modes. Lets map @true to CG_MODE_SOFT to preserve backward compatibility and enhance this option in future via separate option. Reported-by:
Ross Boucher <rboucher@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 15 Jul, 2015 5 commits
-
-
Andrey Vagin authored
It's rudiment. close_old_fds() closes all extra descriptors. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
* reopen a pipe descriptor via /proc/self/fd/X * give another end of a pipe to "criu restore" 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
When we restore an inhereted pipe, we have only one end and we don't know whether it's write or read one. So we need to call reopen_pipe each time. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Otherwise we can get an error like this: 1: \t\tCreate transport fd /crtools-fd-1-5 ... 1: Found id pipe:[122747] (fd 8) in inherit fd list 1: File pipe:[122747] will be restored from fd 9 duped from inherit 1: Error (util.c:131): fd 5 already in use (called at files.c:872) Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-