- 15 Jun, 2015 6 commits
-
-
Cyrill Gorcunov authored
For example some linkers generate @__export_parasite_args as symbol which won't relocate. Handle such case properly. 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>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Otherwise it's confusing since. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
The error I got was: CC pie/piegen/elf-x86-64.o In file included from pie/piegen/elf-x86-32.c:16:0: pie/piegen/elf.c: In function ‘handle_elf_x86_32’: pie/piegen/elf.c:476:3: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘Elf32_Word’ [-Werror=format=] pr_debug("Copying section '%s'\n" \ ^ Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
On PPC64, the hard definition of TFD_IOC_SET_TICKS doesn't match the kernel one. We should use the _IOW based on to be more flexible here. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 11 Jun, 2015 9 commits
-
-
Tycho Andersen authored
We'll need this for use in the restorer blob for restoring LSMs. It looks like arm already has openat, so I think it's just x86 and ppc that need it. In any case, please double check this, as I've only tested it on x86. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Reported-by: Mr Jenkins Signed-off-by:
Andrew Vagin <avagin@openvz.org> Acked-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If the netns image is absent, the NetnsEntry entry will not be initialized. Currently restore from old images crashes: Core was generated by `criu swrk 3'. Program terminated with signal SIGSEGV, Segmentation fault. $0 0x0000000000427d80 in netns_entry.free_unpacked () (gdb) bt $0 0x0000000000427d80 in netns_entry.free_unpacked () $1 0x0000000000436d07 in prepare_net_ns () $2 0x0000000000457c78 in prepare_namespace () $3 0x0000000000432917 in restore_task_with_children () $4 0x00007fc86acfccfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 v2: remove debugging code Cc: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
The checkpoint and restore of the Power PC floating point registers is buggy. The issue is that the signal frame context is defined to store double value while the protocol buffer is handling unsigned 64bits integer value. A silent cast done by the compiler was modifying the restored value in our back. This fix changes the type used when manipulating the FP registers value to be consistent between checkpoint and restart. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Otherwise the root yard can be propagated into the host mount namespace and remain there and criu will fail, because it will not be able to remove the roots yard. It occures if we give a shared mount as root to "criu restore" and criu converts it into a slave mount. Reported-by:
Cyrill Gorcunov <gorcunov@openvz.org> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
Add prefix to the piegen's error and debug output to avoid confusion and fix few debug lines. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
Since opts is defined as extern in piegen.h, there is no need to pass it as argument. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
Introduce a new -o argument to piegen to specify generate file name. Send the debug stream to stdout and force it to /dev/null in the makefile if V=1 is not specify. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
handle elf should return 0 on success. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 08 Jun, 2015 25 commits
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
To hide @nr_gotpcrel Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
When building the blob in the generated header file, we may shrink the output blobk and only copy the sections with the SHF_ALLOC bit set, the other ones are not needed at runtime. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
This cleans the assembly code, removing no more needed trick with the register 2 (TOC pointer). As a consequence, the __export_restore_task_trampoline() and __export_unmap_trampoline() are no more needed. Thus, the changes introduced by the commit de9df910 ("Per architecture restorer trampolines") in cr-restore.c are no more used but are not impacting runtime code anyway. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
PowerPC linking requires the TOC to be in its own section and to be aligned. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
- Move relocs application into a separate file which get compiled as a regular C file in criu (pie/pie-relocs.[ch]) - Move types used by piegen into pie/piegen/uapi/types.h Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
At moment both parasite and restorer do not have any relocs because we support x86-64 only, but this will be changed soon so do a call and apply relocations. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We should use provided @nr_relocs instead of ARRAY_SIZE here. Didn't spot it earlier simply because at moment on x86-64 there is no relocs at all. Also when we apply relocation they are to be computed from virtual base of parasite address, not from local memory map address, so add @vbase parameter. And fix typo on addend in gotpcrel. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In case of @gotpcrel relocations we need additional space to carry pointers. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
After this patch one can run ARCH="ia32" make to build 32bit version on CRIU on 64bit host. Note this is only build procedure which tuned up, the CRIU itself is not yet ready to make a checkpoint/restore cycle -- a lot of additional code is needed and here we rather put stubs simply to make build procedure run. 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>
-
Cyrill Gorcunov authored
There is no rip addressing in 32bit code but PIE code require GOT tables and friend which we better escape for performance sake. So lets use pc relocations it should do the trick. 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>
-
Cyrill Gorcunov authored
To support x86-32 mode we will need own syscall table. Here is it. Note the CRIU itself doesn't support such mode yet. Meanwhile put syscall table here just in case if someone is adding new syscall 32 bit variant should be updated as well. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Since at the moment we're running only x86-64 not 32 bit tasks, and our code is not carrying any big statically defined structures we can use relocatable files directly with all relocation applied during building. This gonna be changed soon once we start supporting 32 bit tasks. IOW even currently we need (which is not yet done but it's safe) - check for gotpcrel relocations - apply relocations with generated elf_apply_relocs helper Currently overall scheme looks this way - our object files are linked together into parasite.built-in.bin.o file - then pie/piegen/piegen tool is called which parses this file and generates C source code file with bytestream and all information needed to rellocate this bytestream into a new place (see elf_apply_relocs helper) Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Here we simply build piegen tool which gonna be used to generate parasite code safe to rellocate. The tool is taking object file as an argument, parses it and generates C file with rellocations encoded in form suitable for fast appliance. Currently only x86-32 x86-64 is supported. v2 (by ldufour@): - Filter PIEGEN Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
On restore we have several arrays of objects that get remapped into pie area and their number is also passed. Clean and shorten the remapping code a bit and bing their naming to common format. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
systemd executes tests in subgroups: 9679 ? Ssl 0:41 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war - [root@jenkins ~]# cat /proc/9679/cgroup 10:net_cls:/ 9:hugetlb:/ 8:cpuset:/ 7:blkio:/system.slice 6:freezer:/ 5:cpu,cpuacct:/system.slice 4:devices:/system.slice/jenkins.service 3:perf_event:/ 2:memory:/system.slice 1:name=systemd:/system.slice/jenkins.service Reported-by: Mr Jenkins Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Adrian Reber authored
The criu(8) man-page is generated using asciidoc. The problem with asciidoc is that, due to its dependencies, it is not available on all distributions or it is undesired to install all asciidoc dependencies. The install target was unconditionally installing and thus building the man-page even if not explicitly specified with 'make docs'. With the new 'install-criu' target everything besides the man-page is installed and the target 'install-man' is only called by the target 'install'. Signed-off-by:
Adrian Reber <areber@redhat.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Looks-ok-to: Cyril Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
On restore we will use the peer's name to connect() the socket back, so if there's no name dump should be aborted. This situation happens when we create a socketpair(), fork and dump only one task with one pair end. Reported-by:
Artem Kuzmitskiy <artem.kuzmitskiy@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
Use SIG_SETMASK instead of SIG_BLOCKMASK here in case the parent had SIGCHLD blocked. In this case if one of the criu threads has a problem, since the SIGCHLD is blocked, the restore simply hangs. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Reported-by: criuport@gmail.com Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Reviewed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-