- 08 Feb, 2016 8 commits
-
-
Kirill Tkhai authored
Since ghost_files content is not available for parent tasks, leave ghost_file names unchanged. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
ghost_files populates another process, than who does try_clean_ghost(), so this list is not visible for the cleaner. Revert the patch. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Fix for commit 0ce8e429 ("kerndat: do not report errors on feature test"). That commit hid error messages for feature testing when you cannot write to /proc/*/loginuid files because of missing kernel patch that allows unsetting loginuid value on older kernels, but it didn't hide error messages in case of disabled CONFIG_AUDITSYSCALL - then you don't have loginuid files. Also fixed comment for kerndat feature test: procfs file might fail to open if it's missing and that's fine - !CONFIG_AUDITSYSCALL case, but it can't fail due permission fault on _read_ (then something is wrong, lets report a problem). Reported-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
This tests sets filters which drops all packets which don't belongs to current tcp connections and creates one tcp connection. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Currently the kernel doesn't report sequence numbers for contracks and tries to restore them from first packets. When we are restoring a tcp connection, we send a window probe and set seq - 1 in it to get ack immediatly. /* Use a previous sequence. This should cause the other * end to send an ack. Don't queue or clone SKB, just * send it. */ tcp_init_nondata_skb(skb, tp->snd_una - !urgent, TCPHDR_ACK); But conntrack doesn't like this, because then we get ack, which is greater than seq. It looks like we try to ack data which we haven't received yet. [ 735.528073] td_maxwin == 0 seq=1081132048 ack=2965916432+(0) sack=2965916432+(0) win=342 end=1081132048 tcp_in_window: sender end=0 maxend=0 maxwin=0 scale=0 receiver end=0 maxend=0 maxwin=0 scale=0 [ 735.533409] log_invalid: seq=2965916431 ack=1081132049+(0) sack=1081132049+(0) win=342 end=2965916431 tcp_in_window: sender end=2965916431 maxend=2965916773 maxwin=342 scale=0 receiver end=1081132048 maxend=1081132390 maxwin=342 scale=0 [ 735.537651] nf_ct_tcp: ACK is over the upper bound (ACKed data not seen yet) The kernel sets IP_CT_TCP_FLAG_BE_LIBERAL for new conntracks, if we are in the middle of a connection. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
We request all contracks via netlink and save netlink messages which describe them in an image file, then we send these netlink messages back on restore. https://github.com/xemul/criu/issues/54Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 07 Feb, 2016 2 commits
-
-
Andrew Vagin authored
rst_mem_alloc() returns alligned slices. When we want to allocate an array element, we don't expect to get a hole between a new element and an old one. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Stas found that if we don't align a pointer, futex and atomic operations can fail. v2: don't hard-code the size of void * v3: add a function to allocate memory without gaps with a privious slice. It's used to allocate arrays. v4: don't change rst_mem_cpos Cc: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 06 Feb, 2016 10 commits
-
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
As of 4.4, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f8e529ed9 c/r of seccomp filters is supported, so let's check for it in --ms. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
As of 4.3, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=13c4a9011 PTRACE_O_SUSPEND_SECCOMP is in the mainline kernel, so we should check for it in --ms. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
CID 157804 (#1 of 1): Missing varargs init or cleanup (VARARGS) 16. missing_va_end: va_end was not called for tmp. v2: typo fix Reported-by: Mr Coverity Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
CID 157800 (#1 of 1): Missing break in switch (MISSING_BREAK) unterminated_case: The case for value 1071 is not terminated by a 'break' statement. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
CID 157801 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS) 19. negative_returns: fd is passed to a parameter that cannot be negative. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
crtools binary is linked with the C library and could rely on all the services this library is providing, including system calls. Thus it doesn't need to be linked with the builtin system calls code made for the parasite/restorer binaries. This patch does: - remove the inclusion of syscall.h - replace all call to sys_<syscall>() by C library <syscall>() - replace unwrapped system calls by syscall(SYS_<syscall>,...) - fix the generated compiler's issues. There should not be any functional changes. The only 'code' changes is appearing in locks.h when futex is called through the C library, the errno value is fetched from errno variable instead of the return value. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
The CRIU internal define of CLONE_SUBNS should not be put in syscall-types.h since this define is not part of a system call. This move is required to prepare the removal of syscall.h from the component of crtools binary. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
The file include/prctl.h should define the struct prctl_mm_map only if it is not already defined in the system include file linux/prctl.h. The definition should be part of the '#ifndef PR_SET_MM_MAP' block since this structure is not defined in that case. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 05 Feb, 2016 4 commits
-
-
Cyrill Gorcunov authored
It is missged in first place and may cause problem on exiting via alarm hanling. Reported-by:
Igor Sukhih <igor@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
All processes should exit if an user presses ctrl-c. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Skip it till remap-links are supported. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 03 Feb, 2016 7 commits
-
-
Kirill Tkhai authored
Test checks that a deleted file content in a deleted parent directory restores right. Initially directory is created in a separate mount, to check the ghost file is created in right mount and link() in rfi_remap() is working. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
This patch makes ghost files to restore with the right path. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Since a deleted file may belong to a deleted directory (which, in turn, may belong to another deleted, etc), it's necessary to recreate all missing dentries in the path. Doing this in mkreg_ghost() is not a good idea, because another ghost file may need some of the dentries in the path, and this requires to do refcouting of recreated directories. To avoid this, we restore a ghost file in the first existing parent directory of the patch. This guarantees, the ghost file will be in the same mount with target file (rfi_remap() needs that, because it uses link()). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
The issue here is that ARCH is not overwritten if the caller Makefile already define it, and the upper Makefile is not overwriting the ARCH define to "arm", when it is "armv7l" for instance, so the SRCARCH is set to "armv7l" which is wrong. With this patch, SRCARCH is using the inherinted define if called from the top level Makefile. This is required to build test on armv7l architecture (qemu). Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Sometimes I get: sudo ./zdtm.py run -t zdtm/live/static/cgroup03 umount: /home/tycho/packages/criu/test/zdtm.qPwsoO: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).) Traceback (most recent call last): File "./zdtm.py", line 1401, in <module> tst.available() File "./zdtm.py", line 435, in available subprocess.check_call(["flock", "zdtm_mount_cgroups", "./zdtm_mount_cgroups"]) File "/usr/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['flock', 'zdtm_mount_cgroups', './zdtm_mount_cgroups']' returned non-zero exit status 1 let's use a lazy unmount so we avoid this. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
cgroup.sane_behavior is read only (and in fact, the value is always 0), so we don't need to c/r this value. Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Tikhomirov authored
We have two separate cases 1) mount is external - has mi->external set, 2) mount is internal - mi->external == 0. For those two cases we need separate decesions on making moutn private. In both cases we need private remount if: a)mount does not have master_id and shared_id or b)if mount has different shared_id from bind source. But do not private remount if has master_id or it will be lost. As after setting private the mount is alone in its shared group so setting master will silently fail as kernel can not find any for our mount. (see do_make_slave) https://jira.sw.ru/browse/PSBM-42829 v2: rework patches 2/4 and 4/4 together and no need then in 3/4 Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 27 Jan, 2016 9 commits
-
-
Stanislav Kinsburskiy authored
AutoFS will need to create write pipe end file descriptor, if it was closed. Thus, pipe_info structure have to be exported. Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Stanislav Kinsburskiy authored
This is a precursor patch for AutoFS mount restore. To restore AutoFS indirect mount points, we have to create mount point dentries. This can do only the process with pgrp, configured to mount. Process, which does AutoFS mount call (init) at that moment is not. Restoring actual pgrp before sid breaks sid restoring. Thus, restoring of sid is required to make process group leader. Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
This cleanup makes create_ghost() smaller. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
This cleanup will be used in next patch. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
In the most cases, file descriptor is not need in this function. It's need in the case of creating a regular file only. So we can use chown() instead of fchown(), and operate with a path directly. The patch moves copying content of a regular file to new function mkreg_ghost(). This will be used in next patches. Also, parameter gf will be used. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Although we don't want to restore the values on these files, we definitely do want to restore the permissions, as certain container engines (lxc) make use of this. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-