- 10 May, 2017 40 commits
-
-
Pavel Emelyanov authored
Looks like this separate stage is not needed. The scripts involved in ns restore are synchronized with existing stages like this: criu: root task: ROOT_TASK stage <appear> "setup-ns" script PREPARE_NAMESPACES prepare_namespace() "post-setup-ns" script FORKING restore_task_mnt_ns() <everything else> which seems to be OK. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
This is wat root task does -- calls prepare_namespace(). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
The stage name is what tasks do, not what criu waits for. When the first stage is started we want the root task to come up, rather than namespaces to get restored. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Don't set futexes by hands, use the restore_switch_stage helpers explicitly (for code readability). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
The restore_switch_stage() already waits tasks at the end, so there's no need in one more waiting. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
It is used now to close descriptors of mount namespaces and will be used for network namespaces too. Acked-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
It is required for cases when we inject a fault in criu restore. In this case we execute "criu restore" and check that it fails, then we execute "criu restore" without a fault and check that it passes. If the first "criu restore" restores only a part of processes, the second criu can get PID of one of restored processes. https://github.com/xemul/criu/issues/282Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
We need compat realization for restorer unmap as after rt_sigreturn() the task is stopped it 32-bit code and ptrace API doesn't allow setting x86_64 full registers set to ia32 task. Generic restorer has now x86-specific __export_unmap_compat() function, which isn't right. Clean restorer from x86-related realization. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
We don't need __export_unmap_compat() for !CONFIG_COMPAT in restorer blob. This preparation will allow to move compatible unmap that's written in x86 asm from generic restorer blob to arch/x86. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Each `make tags` resulted in running feature-tests. That's not needed for tags generation. Don't waste time on tests as we don't compile anything. Reported-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Let's pretend that we're doing something ;-D FWIW: cleaning two lines in the test output: Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> ========================== Run zdtm/static/tty03 in h ========================== make[2]: Nothing to be done for `default'. Start test make[2]: Nothing to be done for `default'. ./tty03 --pidfile=tty03.pid --outfile=tty03.out Run criu dump Run criu restore Send the 15 signal to 24 Wait for zdtm/static/tty03(24) to die for 0.100000 Removing dump/zdtm/static/tty03/24 ========================= Test zdtm/static/tty03 PASS ========================== Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Right now they all sit in a separate file. Since we don't support CLONE_SIGHAND (and don't plan to) it's much better to have them in core, all the more so by the time we dump/restore sigacts, the core entry is at hands already. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Some sysctl-s are optional, so criu has to skip them silently Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
HOSTCFLAGS are populated with CFLAGS if they are set from environment: CFLAGS=-O1 make But it turns out that =? operator, which sets variable iff it was unset previously - is recursive expanded operator. Which means that value of HOSTCFLAGS is evaluated every time it's used. Which is wrong with the current flaw in Makefile: 1. it assigns HOSTCFLAGS with CFLAGS from environment as recursive 2. it assigns target-related options to CFLAGS such as -march. 3. HOSTCFLAGS are used (with the current code - here they are expanded from CFLAGS). Which results in target-related options supplied to host objects building, which breaks cross-compilation. Fix by omitting recursive expansion for HOSTCFLAGS. Still we need to keep $(WARNINGS) and $(DEFINES) in HOSTCFLAGS. Link: https://lists.openvz.org/pipermail/criu/2017-April/037109.html Cc: Cyrill Gorcunov <gorcunov@openvz.org> Reported-by:
"Brinkmann, Harald" <Harald.Brinkmann@bst-international.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
DEFINES, LDARCH, VDSO in one place - visually simpler, more terse. Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Arch-specific options will be clearer without support checks. Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
It's defined in NMK - don't redefine it. Remove BTW twice exports and twice definition of $(LDARCH). Call 64-bit ARM as aarch64. Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Let's keep the same name for 64-bit ARM platform across source. Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Let's call it aarch64 across all CRIU - as I was confused at least once with arm64 name in NMK and this arch-support check. Yet allowed to be named arm64, as NMK patch is separated. Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
I bumped in this myself when I had libc6-dev-i386 installed, while criu said I didn't. Save other guys'es time, spent in this place. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Acked-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
When restoring w/o namespaces it doesn't make sence to mount /proc by hands and detach it. We can just use the host-side one. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
When injecting the restorer blob criu parses /proc/self/maps file to find out the hole for the blob itself. It happens every time and the maps file for criu is now HUGE (~12k), so it's much more efficient to use bfd for it rather than glibc's fopen. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
This file is parsed on each start, it's nicer to make it use bfd engine and save several syscalls and #PFs. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
When running criu_dump() with zero pid (self dump) a zombie from the library is left underneath the running processes and this zombie is thus written into the images. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
This naming is left from the first compatible kernel patches. At that time to return to 32-bit task rt_sigreturn was used with a special flag. Now it's not true anymore, the naming doesn't relate. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Many of sysctl_op-s we have read (or write) single entry. In current implementaiton this results in two opens and two closes for each -- open /proc/sys, then open the rest. It's better to use open_proc() as the latter already have fd for /proc cached. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Point that ia32 C/R was disabled due to missed packages. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
As cr-exec is deprecated-removed, drop ruins. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Each opening of a file results in getpid() call which is now a pure syscall :( For this particular case this value is poitless, as log engine already prints pids. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
We do this to get real pids of the threads, but sometimes we just know that value. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Veronika Kabatova authored
Introducing negative options for true / false values. The original getopt_long parser is kept since it is able to set flag-like values (instead of setting these values in the switch when it's not needed). The type of the options needed to be changed to integers for getopt_long to accept flag-like value settings (as per getopt_long documentation, the address of integer variable has to be passed). Corresponding negative options are not added for deprecated options. This patch is a preparation for the addition of configuration files (GitHub issue #278). General idea of this feature is to have global configuration files in /etc/criu.d/ directory and user-specific configuration files in $HOME/.criu.d/ directory, with the possibility of specifying a chosen file to be used (default files will be used if none is specified, or none in case the default ones are not present, to not break compatibility). The options in configuration files should be possible to be overriden by the options specified on command line, hence the negative options addition. The whole feature of configuration files will remove the need of specifying all the options on command line, with the possibility of reusing a file for different use case with only overriding some of the values specified there. In case both types of option (negative and positive) are passed, the later one will be applied -- this works with the philosophy of overriding the "earlier" options from configuration files. Changes since v1: - Describe the --no- option prefix in the beginning of OPTIONS section in both man page and --help instead of mentioning it at every eligible line (this also fixes line length issue with --help) - Fix the accidental removal of check_only case caused by bad rebase - Use a macro for getopt_long struct option generating instead of additional defines and hardcoded lines Signed-off-by:
Veronika Kabatova <vkabatov@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Adrian Reber authored
When checking for XSAVE availability it makes more sense to check for OSXSAVE than to check for XSAVE. This way the check works on systems booted with the 'noxsave' kernel command-line. travis-ci: success for zdtm/static/fpu01: check for OSXSAVE instead of XSAVE Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Make this function more generic: we want to do not dup not only transport socket of parent, but just all service fds, which were not opened at the moment of clone() in parent. But, yes, currently it's only transport socket. travis-ci: success for files: Unify clone_service_fd() Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-