- 12 May, 2018 34 commits
-
-
Mike Rapoport authored
Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Instead of relying on length of various lists add a boolean variable to lazy_pages_info to make it clean when the process has exited Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
Currently zdtm doesn't detect when restore failed, if it is executed with strace. With this patch, fake-restore.sh creates a test file, and zdtm is able to distinguish when restore failed. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
The get() method requires a key and now we are using an index. That will never work correctly as it is now. Acked-by:
Adrian Reber <adrian@lisas.de> Reported-by:
Adrian Reber <adrian@lisas.de> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
Currently we restore all sockets in the root mount namespace, because we were not able to get any information about a mount point where a socket is bound. It is obviously incorrect in some cases. In 4.10 kernel, we added the SIOCUNIXFILE ioctl for unix sockets. This ioctl opens a file to which a socket is bound and returns a file descriptor. This new ioctl allows us to get mnt_id by reading fdinfo, and mnt_id is enough to find a proper mount point and a mount namespace. The logic of this patch is straight forward. On dump, we save mnt_id for sockets, on restore we find a mount namespace by mnt_id and restore this socket in its mount namespace. Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
unix_process_name() are called when sockets are being collected, but at this moment we don't have socket descriptors. A socket descriptor is reuired to get mnt_id, what will allow to resolve a socket path in its mount namespace. Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
This ioctl opens a file to which a socket is bound and returns a file descriptor. This file descriptor can be used to get mnt_id and a file path. Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
The USK_CALLBACK flag means that a socket is externel and will be restored by a plugin. open_unixsk_standalone should not be called to these sockets. $ make -C test/others/unix-callback/ run ... (00.109338) 7471: sk unix: Opening standalone socket (id 0xd ino 0 peer 0x63b) (00.109376) 7471: Error (criu/sk-unix.c:1128): sk unix: BUG at criu/sk-unix.c:1128 Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
Unix file sockets have to be restored in proper mount namespaces. Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
When walking over unix sockets make sure the queuer is present before accessing it. https://jira.sw.ru/browse/PSBM-82796Reported-by:
Vitaly Ostrosablin <vostrosablin@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Kir Kolyshkin authored
There was a "; done" leftover here, somehow ignored by dash but not bash. Remove it. Signed-off-by:
Kir Kolyshkin <kolyshkin@gmail.com>
-
Kir Kolyshkin authored
It is not used, probably was committed by mistake. Fixes: 2d093a17 ("travis: add a job to test on the fedora rawhide") Signed-off-by:
Kir Kolyshkin <kolyshkin@gmail.com>
-
Kir Kolyshkin authored
Fix Fedora rawhide CI failure caused by coreutils-single and our way of running under QEMU. Signed-off-by:
Kir Kolyshkin <kolyshkin@gmail.com>
-
Kir Kolyshkin authored
1. Sort lists of packages to be installed, unify indentation. 2. Merge "ccache -s" and "ccache -z". Signed-off-by:
Kir Kolyshkin <kolyshkin@gmail.com>
-
Kir Kolyshkin authored
In Ubuntu Bionic for armhf, clang is compiled for armv8l rather than armv7l (as it was and still is for gcc) and so it uses armv8 by default. This breaks compilation of tests using smp_mb(): > error: instruction requires: data-barriers The fix is to add "-march=armv7-a" to CFLAGS which we already do, except not for the tests. Signed-off-by:
Kir Kolyshkin <kolyshkin@gmail.com>
-
Adrian Reber authored
The newly introduced output of the CRIU and kernel version does not happen when running CRIU under RPC. This moves the print_versions() function util.c and calls it from cr-service.c Signed-off-by:
Adrian Reber <areber@redhat.com>
-
Kirill Tkhai authored
This patch makes restore_one_inotify() to request specific watch descriptor number instead of iterating in (possible) long-duration loop if system supports it. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Kirill Tkhai authored
This is a new ioctl, which allows to request next descriptor allocated by inotify_add_watch(). https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git/commit/?h=for_next&id=e1603b6effe177210701d3d7132d1b68e7bd2c93 The patch checks this cmd is supported by kernel. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Kirill Tkhai authored
Currently, one feature is supported. Add possibility for a test to depend on several features. v2: Delete excess "if" as suggested by Andrey Vagin. Rename variables to decrise patch size. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
Previous patch missed "git add", so simlink and .desc file were not sent... Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Andrei Vagin authored
We need this to save backward compatibility with old images. It is zero only if it is absent in an image file. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrew Vagin authored
tun test in nested net ns wrapper. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> ktkhai: Makefile hunks Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Andrew Vagin authored
This adds new tunfile_entry::ns_id field and populates it in standard socket way. Restore uses this ns_id to choose correct namespace. Note, we could completelly skip set_netns() on restore in case of !has_ns_id, but using top_net_ns invents some definite behaviour. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> ktkhai: comment written/code movings Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Kirill Tkhai authored
Similar to socket logic, abort the dump, if tun is not related to any net ns, seen before. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Kirill Tkhai authored
Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Kirill Tkhai authored
Refactoring, no functional change. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Kirill Tkhai authored
LAZY_PAGES_SK_OF is need only once for every process, and it's not frequently used, so we can place it to fdstore. https://travis-ci.org/tkhai/criu/builds/343405755Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Kirill Tkhai authored
Sockets are sent via SCM_CREDENTIALS, and this kernel interface needs to have uid and gid mapped (see __scm_send() in kernel). So, set them before send_fds() use. Also, move prep_usernsd_transport() below to be after this for uniformity. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
https://github.com/checkpoint-restore/criu/issues/466Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 29 Mar, 2018 1 commit
-
-
Pavel Emelyanov authored
A bug sneaked into the --shell-job restore while doing 3.8 merge. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 27 Mar, 2018 1 commit
-
-
Andrei Vagin authored
When the "core: Init fdstore even earlier" commit was moved into the master branch, one hunk was lost. https://github.com/checkpoint-restore/criu/issues/460Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 13 Mar, 2018 1 commit
-
-
Pavel Emelyanov authored
We've slowed down a little, but still new features and bugfixes appear. This time we've improved lazy migration, completed SCM messages support, added nesting netns support (now we have two of them -- net and mnt) and did many small fixes here and there. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 02 Mar, 2018 3 commits
-
-
Dmitry Safonov authored
Coverity has informed: *** CID 188251: Error handling issues (CHECKED_RETURN) /criu/arch/x86/crtools.c: 196 in kdat_x86_has_ptrace_fpu_xsave_bug_child() 190 return 0; 191 } 192 #endif 193 194 static int kdat_x86_has_ptrace_fpu_xsave_bug_child(void *arg) 195 { >>> CID 188251: Error handling issues (CHECKED_RETURN) >>> Calling "ptrace" without checking return value (as is done elsewhere 46 out of 51 times). 196 ptrace(PTRACE_TRACEME, 0, 0, 0); 197 kill(getpid(), SIGSTOP); 198 pr_err("Continue after SIGSTOP.. Urr what?\n"); 199 _exit(1); 200 } 201 Also added checks for kill() and waitpid(). Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
Child may see close() result before it receives signal, while it shouldn't see it. Instead of games with later close(), just stop do it. sys_exit() after program finish will close them all. Reported-by:
Andrey Vagin <avagin@virtuozzo.com> Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Currently we save only attributes with non-zero values. For example, a default value for IFLA_IPTUN_PROTO is IPPROTO_IPV6 (41), so we have to save even attributes with zero values. https://github.com/checkpoint-restore/criu/issues/445 Fixes: 4a044e6a ("net: Dump regular sit device") Cc: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-