2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 05:48:05 +00:00

8088 Commits

Author SHA1 Message Date
Cyrill Gorcunov
fd814de1d3 infect: Move compel_relocs_apply into engine
It will move into compel on a final pass.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:05 +03:00
Pavel Emelyanov
e9700c4ff4 infect: Introduce and use parasite_blob_desc
The _desc is to describe where libcompel should task
parasite code from. For now the parasite is taken as
piece of memory, but more ways to load the code will
come soon.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:05 +03:00
Pavel Emelyanov
901ccfb8ca infect-rpc: Split into priv and uapi parts
Some pieces from infect-rpc are used by criu's pie code
which will soon be moved into compel std plugin itself,
so prepare for this.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:05 +03:00
Pavel Emelyanov
2e944f721a infect: Add log_fd on ictx
This is the descriptor to be used by parasite code for
messages. In pure compel environment this will have to
be some file provided by caller or a pipe from which
libcompel will pull messages.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:05 +03:00
Cyrill Gorcunov
2a014c09eb criu: Call compel with debug level when building blobs
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:05 +03:00
Pavel Emelyanov
9df806aedd pie: Detach infect
This moves the previously splitted routines into pie/infect.c.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:04 +03:00
Pavel Emelyanov
6606dc722c scm: Switch compel fd plugin onto common
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:04 +03:00
Cyrill Gorcunov
e92c326692 compel: Update with move lock.h into include/common/
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:04 +03:00
Pavel Emelyanov
a406965e97 infect arm & aarch64: Remove kdat
In these gents the task_size should be known.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:04 +03:00
Pavel Emelyanov
721e7fa5da infect x86: Remove kdat
The kdat is used to check whether we have compat sigreturn
in the kernel. Compel can check it himself, but criu already
knows this.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:04 +03:00
Cyrill Gorcunov
5e48c690c7 compel: Build syscalls before the compel
We will use syscall types in compel infect engine
itself so make sure they are built earlier.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:03 +03:00
Cyrill Gorcunov
b05f066644 compel: Move fpu.h into it
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:03 +03:00
Cyrill Gorcunov
5a6d2cea06 criu: Fix headers for non-x86 arches.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:03 +03:00
Cyrill Gorcunov
aabb45bece compel: Move cpu interface to compel
We will need it when parasite engine will be creating signal frames.
Export appropriate headers and use it in CRIU by linking with libcompel.a.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:03 +03:00
Cyrill Gorcunov
1a30731b1f compel: Add callback-based log engine
pr_out is only special left in piegen engine, the rest use
compel's pr_x output. Probably we will need to enhance it
one day to make same close to what we have in criu.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:02 +03:00
Cyrill Gorcunov
5f6c28567a compel: Rename shipped library to libcompel.a
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:02 +03:00
Cyrill Gorcunov
a0810481e5 compel: Include compel headers as system ones
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:02 +03:00
Cyrill Gorcunov
a714fff5a3 compel: Use common's compiler.h
And drop compel/include symlink.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:02 +03:00
Cyrill Gorcunov
bb8b8e84f9 compel: Remove criu's int.h from infect
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:02 +03:00
Pavel Emelyanov
f81d69da31 infect: Remove types.h from infect.h
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:01 +03:00
Pavel Emelyanov
f3021b6ab5 infect: Remove criu util.h from infect
This includes

* The close_safe() routine for infect
* Callback for opening proc files on infect_ctx

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:01 +03:00
Pavel Emelyanov
dec9a25054 infect: Move processor-flags.h into compel
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:01 +03:00
Pavel Emelyanov
468a649225 infect: Move errno.h to compel
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:01 +03:00
Pavel Emelyanov
3a90e8e7f6 infect: Reshuffle headers
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:01 +03:00
Pavel Emelyanov
f15dfc6107 infect: Move __NR32_mmap into compel headers
This remove parasite-syscall.h from infect.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:01 +03:00
Pavel Emelyanov
c954ac1618 infect: Move breakpoints management into infect
This removes restorer.h from infect. The header describes
routines, structures and constants messing with restorer blob.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:01 +03:00
Pavel Emelyanov
6fee9c70a7 infect: Remove parasite-syscall.h from infect
This is

* Move parasite_setup_regs() and related into arch/infect
* Move arch_can_dump_task() into infect
* Move parasite_send_fd() into infect-util

and completes parasite-syscall.h removal.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:00 +03:00
Pavel Emelyanov
5156b096b1 infect: Move thread_ctx structure into infect
For now it's becoming the part of the compel API and lets
us remove parasite-syscall.h from infect.c. The former header
includes declarations of CRIU dumping routines that work with
parasite code.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:00 +03:00
Pavel Emelyanov
cd368c8e08 infect: Move ptrace_get/set_regs() into ptrace.c
The criu/ptrace.c will also go into compel sources, so
detach the needed code from CRIU as well.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:00 +03:00
Pavel Emelyanov
3e2f895732 infect: Remove parasite.h from infect.c
This header describes CRIU parasite code, it has nothing
to do with infect, so remove it.

To do this we need to:

* Detach infect RPC commands from criu-parasite ones
* Move parasite_init_args and parasite_unmap_args into infect
* Move PARASITE_AREA_MIN into infect
* Hiding PARASITE_STACK_SIZE-s in infect
* Hiding parasite symbols resolvers in infect

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:00 +03:00
Pavel Emelyanov
2abf96bb75 infect: Move ksigset helpers into compel
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:00 +03:00
Cyrill Gorcunov
432351d6b7 compel: Create symlink into arch dir inside uapi headers
To be able to include compel/asm/ headers when needed.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:00 +03:00
Pavel Emelyanov
df217daa31 infect: Remove infect-priv.h from arch/crtools.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:00 +03:00
Pavel Emelyanov
62e1ba9351 infect: Move mmap_seized() and syscall_seized() into arch/infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:59 +03:00
Pavel Emelyanov
3b8dcf0266 infect: Move get_task_regs-s into arch/infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:59 +03:00
Pavel Emelyanov
590856f51a infect: Introduce arch part
Same split as was previously done with parasite-syscall.c now
with arch/*/crtools.c files.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:59 +03:00
Pavel Emelyanov
f98a557529 infect: Introduce API to configure the infection
I.e. -- the infect_ctX structure. Now it's in infect.h and
is aimed for compel sources.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:59 +03:00
Pavel Emelyanov
5e75d49946 infect: Move sigmask getter (from ctl) into infec.c
... and hide compel priv from parasite-syscall.
Now it's completely isolated inside compel.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:59 +03:00
Pavel Emelyanov
329d2c156b infect: Move seized_native() into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:59 +03:00
Pavel Emelyanov
795049e6a7 infect: Move parasite RPC code into infect-rpc.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:59 +03:00
Pavel Emelyanov
315b0d82aa infect: Move pie tracing code into infect.c
Note -- presumably it's another functionality block inside compel,
so another .c file might be tempting here.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:59 +03:00
Pavel Emelyanov
18248ce4bd infect: Move unseize_task() into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00
Pavel Emelyanov
754a2d9501 infect: Move parasite_map_exchange() into infect.c
Note -- this will go away from compel API with cr-exec.c

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00
Pavel Emelyanov
b071c6e3f0 infect: Move restore_thread_ctx() into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00
Pavel Emelyanov
511a6ffd29 infect: Move parasite_trap() into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00
Pavel Emelyanov
34db99e3c8 infect: Move parasite_unmap() into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00
Pavel Emelyanov
6a4279dd9e infect: Move parasite_run_in_thread() into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00
Pavel Emelyanov
93d6aeb862 infect: Move parasite_execute_syscall() into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00
Pavel Emelyanov
d4b415eb86 infect: Move parasite_args* into infect.c
This is the code that lets caller place arguments into memory
shared between parasite and compel (or caller).

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00
Pavel Emelyanov
3a53b58922 infect: Move parasite_stop_daemon and parasite_cure_* into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:58 +03:00