- 14 Mar, 2017 40 commits
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
To ship plugins, libs and dev headers. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Because we build compel from toplevel directory inclusion of "common/" doesn't cause any problem but will in future (especially when our headers start using it). Thus add symlink immediately and it will be a notice for installer that common directory in needed in uapi. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Right now we load blob into libcompel by providing values from .h file which was generated by "compel hgen" command. In the future we'd like to provide other ways (e.g. by pusing mmap()-ed memory with .o file, or by .o file path), so prepare for such future. travis-ci: success for compel: Prepare for several ways to load blob into libcompel Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Where hgen stands for "header generator". travis-ci: success for compel: Rename 'piegen' action into 'hgen' Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
- extend handle_sigchld - fix garbage return in compel_prepare - handle errors in make_sock_for travis-ci: success for compel: A few fixes and example Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
It's libcompel's helper. We need to address this problem later. travis-ci: success for compel: A few fixes and example Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Implementation for PIE's builtin_memcpy located at criu/arch/x86/include/asm/string.h travis-ci: success for Compel/compat cleanups Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
We don't need them in libcompel for PIE - only needed for C/R. Fixes (with compat enabled back): CC criu/arch/x86/sigaction_compat.o In file included from criu/arch/x86/sigaction_compat.c:1:0: /home/japdoll/tools/criu/criu/arch/x86/include/asm/restorer.h:15:25: error: unknown type name ‘tls_t’ extern void restore_tls(tls_t *ptls); ^~~~~ travis-ci: success for Compel/compat cleanups Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Libcompel is now responsible for system calls - criu already depends on building of compel, this code is commented-out... Drop it! travis-ci: success for Compel/compat cleanups Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Remove compatible sigset structure: as it has the same size for both 32-bit and 64-bit, I didn't use it across the code, only for a size check. The check is removed as we use now only k_rtsigset_t. Wordsize for sigset is changed to 64-bit - as it's written in comment for possible 32-bit native building. If we ever going to support compat mode for other archs, we will need to re-introduce compat_sigset_t type if it has for those archs different sizes for compat/native builds. But for a while, let's simplify this. travis-ci: success for Compel/compat cleanups Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Now we have two routines one of which needs a callback for proc parsing. This is complex, but needed by CRIU. For others let's have a single "stop" call that would to everything. travis-ci: success for compel: Contrinue improving library Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
CRIU keeps all registers on CoreEntry and makes sigframe from them as well, which means anyone using the compel library have to provide own handlers, which is inconvenient. So now it's possible to leave this task for libcompel itself: it will save the regs and prerare sigframe on its own. travis-ci: success for compel: Contrinue improving library Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
CRIU sets up a child hander to get errors from tasks it infects. For compel we'd have the same problem, so there's a way to request for custom child handler, but compel should provide some default by himself. And it's not clear atm how this should look like, so here's a plain stub to move forward. travis-ci: success for compel: Contrinue improving library Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Compel needs a socket that lives in victim's net namespace. CRIU creates this socket once for all the processes it works with. For pure compel case the socket is created for each new ctl. travis-ci: success for compel: Contrinue improving library Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Yet again -- CRIU has an optimized openat()-based engine that is slightly faster for opening "/proc" files rather than plain open(). The latter is provided by default by compel. travis-ci: success for compel: Contrinue improving library Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
The ictx->syscall_ip is the address of any x-able VMA. CRIU knows this as it parses the smaps file (heavily). For others compel just parses /proc/pid/maps file. travis-ci: success for compel: Contrinue improving library Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
The original compel_prepare() also initializes the infect_ctx with values suitable for simple usage. As a starting point the task_size value is set. The compel_prepare_noctx() allocates ctx-less handler that is to be filled by the caller (CRIU). travis-ci: success for compel: Contrinue improving library Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
https://travis-ci.org/xemul/criu/builds/177585567Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
This one is needed only for task_size() on some arches and it is simpler to keep this routine in compel .c rather than messing with common/page.h installation. https://travis-ci.org/xemul/criu/builds/177585567Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
PIE logger already in compel. Forgot to remove. travis-ci: success for criu: Drop dangling symlink Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kir Kolyshkin authored
This is highly controversial, but fixes the following compilation problem with Alpine Linux (i.e. musl libc) caused by the previous commit (""): > gcc -c -O2 -g -Wall -Wformat-security -Werror -D_FILE_OFFSET_BITS=64 > -D_GNU_SOURCE -iquote include/ -iquote /criu/compel/include -iquote > /criu/criu/arch/x86/include -iquote /criu/criu/include -iquote > /criu/include -iquote /criu -fno-strict-aliasing -iquote > /criu/criu/include -iquote /criu/include -iquote /criu/images -iquote > /criu/criu/pie -iquote /criu/criu/arch/x86 -iquote > /criu/criu/arch/x86/include -iquote /criu/ -I/usr/include/libnl3 -iquote > compel/plugins/include -iquote compel/include -iquote > compel/arch/x86/plugins/std -iquote /criu/compel/plugins/include -iquote > /criu/compel/include -DCR_NOGLIBC -Wstrict-prototypes > -fno-stack-protector -nostdlib -fomit-frame-pointer -fpie > -DCONFIG_X86_64 criu/pie/parasite.c -o criu/pie/parasite.o > In file included from /criu/criu/include/util.h:10:0, > from /criu/criu/include/restorer.h:13, > from criu/pie/parasite.c:23: > /usr/include/fortify/string.h:37:27: error: redefinition of 'memcpy' > _FORTIFY_FN(memcpy) void *memcpy(void *__od, const void *__os, size_t > __n) > ^ > In file included from > compel/plugins/include/uapi/std/syscall-types.h:13:0, > from compel/plugins/include/uapi/std/syscall-64.h:5, > from compel/plugins/include/uapi/std/syscall.h:8, > from criu/pie/parasite.c:11: > /usr/include/sched.h:72:7: note: previous definition of 'memcpy' was > here > void *memcpy(void *__restrict, const void *__restrict, size_t); > ^ > In file included from /criu/criu/include/util.h:10:0, > from /criu/criu/include/restorer.h:13, > from criu/pie/parasite.c:23: > /usr/include/fortify/string.h:64:27: error: redefinition of 'memset' > _FORTIFY_FN(memset) void *memset(void *__d, int __c, size_t __n) > ^ > In file included from /usr/include/fortify/string.h:20:0, > from /criu/criu/include/util.h:10, > from /criu/criu/include/restorer.h:13, > from criu/pie/parasite.c:23: > /usr/include/string.h:27:7: note: previous definition of 'memset' was > here > void *memset (void *, int, size_t); > ^ > /criu/scripts/nmk/scripts/build.mk:103: recipe for target > 'criu/pie/parasite.o' failed > https://travis-ci.org/kolyshkin/criu/builds/174634847Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Currently we prepare a parasite socket only once and save it in a static variable. It's bad idea to use a static variable in a library. In addition, it doesn't work if we have processes in different network namespaces. In this case, we have to have a separate socket for each namespace. v2: fix compilation on Alpine convert *p_sock into sock travis-ci: success for compel: check whether a parasite socket is prepared each time (rev2) Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Providing infect functionality inside std plugin doesn't look suite for me: the restorer has to define dummy parasite_daemon_cmd/parasite_trap_cmd/parasite_cleanup just to be able to compile with it. So we have to define weak stubs right here in near future. travis-ci: success for compel: The final infect move and install target Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
travis-ci: success for compel: The final infect move and install target Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
- Add uapi header and start using it - Add std_ prefix into functions and constants - Drop unneeded headers travis-ci: success for compel: The final infect move and install target Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
The same as prev patch -- clean up the compel.h Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
This cleans up the main-entry header compel.h 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
This only means introducing a compel_get_task_regs wrapper over the get_task_regs() call that works on thread-ctl, not thread-ctx. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
The structure is opaque hander for thread infection. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
The plan is to rectify the thread infection API and hide thread_ctx from uapi eventually, so here's the symmetrical to compel_task_sigmask() call for threads. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
piegen mode is cli only, so no need for them in library. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Currently criu built with criu/pie-util-fd (which is a symlink to criu/pie/util-fd) with same flags as we use in general compel infection code. Moreover the criu link with libcompel.a, so we get a problem where send_fds/recv_fds are multiple defined. Lets rather unweave this mess: - drop criu/pie-util-fd.c completely - move send_fd/recv_fd inliners into scm.h Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
These were lost when moving code from CRIU, so pull them back in. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
This plugin is all about sending scm-s over unix sockets, so having this stuff there is helpful. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Now when *.lds is in compel we can switch to it. Also -- remove the criu lds generation code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
In CRIU these are auto-generated, we want to have them in compel and it looks like it's better to have them fixed rather than generated. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-