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
Pavel Emelyanov
e156ab5a62 infect: Move parasite_prep_ctl into infect.c
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
bb33a7742a infect: Move infect() into infect.c
Not only infect() routine but all dependant code too. This is
the core of the library actually.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
2724375919 infect: Make parasite_ctl private
This structure will be internal to compel. Users will only see
one as opaque pointer and read data from it using calls.

Exception for now -- infect_ictx. This is a configuration structure
that will be embeded into ctl and seen outside.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
7d3e7b05fe infect: Move seize_wait_task -> compel_wait_task
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
ea470224b6 infect: Move seize_catch_task -> compel_stop_task
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
6dc2e2decd infect: Introduce skeleton for soon-to-be compel code
We'll collect the compel code here and will move all these
files into compel library by the last patch of this set.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
1fe80294ec infect: The big split of infection routine
Now we can split the parasite_infect_seized() into CRIU-specific
part and independent part that is to become compel code.

The API to infect() is for now a bit clumsy, but I will rectify one
a bit more in the next patches.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
2c76fc8a53 infect: Keep entry point for first syscall on ictx
This is the address of an executable VMA. To get one
we need to parse /proc/pid/maps, compel will do it, but
since criu already parses this file (to dump task vmas),
we can provide the address via ictx.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
c0e468dd2e infect: Add registers keeping on infect_ctx
Two calls -- to keep the registers and to put them back onto
sigframe. For CRIU the keeping is performed on CoreEntry.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:57 +03:00
Pavel Emelyanov
3569b51eef infect: Place sigchild handler on ictx
To track victim health state criu sets up the sigchild handler.
So will have to do the compel, but the ability to request for
own handler would be required.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Pavel Emelyanov
7745501409 infect: Introduce flags on ictx
These will control various behavior of infection engine. For now
only fault-injections.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Pavel Emelyanov
71a4b46cdb infect: Introduce infect_ctx
This structure will become the part of compel A[PB]I and
will be used by compel clients as configuration structure.

For now put there the pointer on a socket living in victim's
netns. If empty (-1), compel will create this socket its own,
but CRIU already creates such in an effective manner.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Pavel Emelyanov
903be4131d seize: Make seize_wait_task() parse task status via callback
When seizeing task we need to parse /proc/pid/status for its
state, parent, signals and seccomp status.

In criu case we also parse other stuff in one go, so make
this parsing be a callback which criu will provide.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Pavel Emelyanov
6e49bce780 seize: Split proc_status_creds into pieces
There's a subset of this structure is required by seize_catch_task(),
which in turn will go to compel library. So prepare for that.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Pavel Emelyanov
976e13a193 arch: Turn save_task_regs into pointer
The get_task_regs() call now accepts a pointer on a function that
is to keep obtained registers somwehere.

In CRIU case this "somewhere" is CoreEntry, for generic compel
user we'll need to add simple memcpy()-s to the library itself.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Pavel Emelyanov
da17b223f1 parasite: Do not get task regs twice on start
First time regs are saved on ctl->orig.regs in parasite_prep_ctl,
the 2nd time regs are got inside x86/arch_task_compatible, while
it can use the on-ctl copy.

travis-ci: success for Don't get task regs twice
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Pavel Emelyanov
44c15c6cd9 x86: Mark arch_task_compatible static
travis-ci: success for Don't get task regs twice
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Kir Kolyshkin
084b0fb0ec compel/handle-elf.c: handle R_PPC64_REL32
When compiled with clang-3.8 on ppc, compel complains:

>   GEN      criu/pie/parasite-native-blob.h
> parasite_native_blob: Error (compel/src/lib/handle-elf-host.c:541):
> Unsupported relocation of type 26

Look into R_PPC64_REL64/R_PPC64_ADDR64 and handle 32-bit the same way.

travis-ci: success for PPC+clang compile fixes
Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:56 +03:00
Kir Kolyshkin
3da152a5ab compel: rm -fno-jump-tables from CFLAGS
Three reasons:
1. this flag doesn't work for ppc64 (see commit dc7b08b);
2. clang is not aware of this flag;
3. all seems to work just fine without it.

Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:55 +03:00
Kir Kolyshkin
d2a1aa1b6b compel: mv noexecstack from CFLAGS to LDFLAGS
In a manner similar to one of commit 9303ed3 ("Makefiles: move
-Wa,--noexecstack out of CFLAGS"), let's move this option to
linker flags (see the abovementioned commit for reasoning).

travis-ci: success for series starting with [1/3] compel: mv noexecstack from CFLAGS to LDFLAGS
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:55 +03:00
Dmitry Safonov
04ae288af3 x86, tls: read no more than saved TLS entries
While writing this, I somehow managed to miss the check of
how many entries were saved in core image.
So it may dereference here bs.

Fixes: #228
Fixes: commit 6fde3b8c27db ("x86: restore TLS")

travis-ci: success for x86, tls: read no more than saved TLS entries
Cc: Andrei Vagin <avagin@virtuozzo.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
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>
2017-03-15 00:05:55 +03:00
Cyrill Gorcunov
efc87fce32 compel: cli -- Show own version with option
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:05:55 +03:00
Tycho Andersen
8c39a00037 gitignores: ignore some more generated files
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:55 +03:00
Kir Kolyshkin
1fe09eb358 Makefiles: move -Wa,--noexecstack out of CFLAGS
The problem is, -Wa is a flag for assembler, but CFLAGS are also used
to generate dependencies, and clang complains loudly when it is used
for deps:

> >   DEP      compel/arch/x86/plugins/std/syscalls-64.d
> >  clang-3.8: error: argument unused during compilation:
> > '-Wa,--noexecstack'

This patch moved the noexecflag from assembler to linker. I am not
100% sure but the end result seems to be the same.

This fixes dependency generation when using clang instead of gcc.

I surely have done my research before proposing this change, and
I have tested this change as good as I could.
Sorry, I should have provided more background in the commit message.
Here it goes.

There are a few ways to have non-executable stack:
1. mark the assembler source file (.S) with .section
.note.GNU-stack,"",%progbits
2. pass the -Wa,--noexecstack to compiler
3. pass the -z execstack to linker

All three ways are fine, let's see them in greater details.

Some people say (1) is the best way, but we have way too many
.S files now (23 of them, to be exact). Anyway, I can certainly do it
this way if you like, just let me know. It would look like this:

    --- a/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S
    +++ b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S
    @@ -3,6 +3,8 @@
     * that are not implemented in the AArch64 Linux kernel
     */

    +.section .note.GNU-stack,"",%progbits
    +
     ENTRY(sys_open)
     mov x3, x2
     mov x2, x1

Way (2) is what is currently used. Unfortunately it breaks dependency
generation with clang. One way to fix it would be to filter-out the bad
flag when we're generating deps. I tried experimenting with
$(filter-out) function in Makefiles today but it's complicated and I failed
to make it work.

Way (3) is what this commit offers. It seem to work fine while being
the least intrusive.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@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>
2017-03-15 00:05:55 +03:00
Kir Kolyshkin
b6c4300723 pie: Fix deps for own memcpy for x86
Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:55 +03:00
Kir Kolyshkin
4442b7546f criu/parasite-syscall.c: init a var
Got the following from clang:

>   CC       criu/parasite-syscall.o
> criu/parasite-syscall.c:1494:6: error: variable 'parasite_size' is used
> uninitialized whenever 'if' condition is false
> [-Werror,-Wsometimes-uninitialized]
>         if (seized_native(ctl))
>             ^~~~~~~~~~~~~~~~~~
> criu/parasite-syscall.c:1503:2: note: uninitialized use occurs here
>         parasite_size += ctl->args_size;
>         ^~~~~~~~~~~~~
> criu/parasite-syscall.c:1494:2: note: remove the 'if' if its condition
> is always true
>         if (seized_native(ctl))
>         ^~~~~~~~~~~~~~~~~~~~~~~

I look at the code and I'm still not quite sure whether parasite_size
can end up being uninitialized. Looks like for CONFIG_X86_64 it can.

So, let's initialize it.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:05:55 +03:00
Laurent Dufour
1488134208 compel: fix build break on ppc64le
This patch fix a build break on ppc64le introduced by changes in the
compel's build option.

I factorized the common CFLAGS to make easier identifying particular
flags required by some architectures.

Fixes: fef01d79f7ee ("compel: cli -- Add more flags into cflags report")
travis-ci: success for compel: fix build break on ppc64le
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-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:05:55 +03:00
Cyrill Gorcunov
429da90376 compel: criu -- Use std plugin directly
When compel build objects it provides ".compel.init" and
".compel.exit" setions for plugins init/exit routines
and when we link PIE code in criu we simply zap them
out but code still reference to them inside std
text (even if we don't call them) so dont drop them.

Eventually compel will be loading plugins by self but
for now it's good for testing purpose to refernce
the plugin inside criu code.

Signed-off-by: Cyrill Gorcunov <gorcunov@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>
2017-03-14 23:58:21 +03:00
Cyrill Gorcunov
219a99c74e compel: cli -- Add more flags into cflags report
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-14 23:58:21 +03:00
Kir Kolyshkin
c1133055ec Add compel-host to .gitignore
This is an addition to commit ed5b351.

travis-ci: success for Add compel-host to .gitignore
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14 23:58:21 +03:00
Cyrill Gorcunov
2a43af1220 complel: plugins -- Disable coverage and mcount
They are not supported in plugins.

Signed-off-by: Cyrill Gorcunov <gorcunov@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>
2017-03-14 23:58:21 +03:00
Cyrill Gorcunov
bc9cddbbac complel: plugins,std -- Don't forget to cleanup syscalls.S
Signed-off-by: Cyrill Gorcunov <gorcunov@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>
2017-03-14 23:58:21 +03:00
Cyrill Gorcunov
84175119d1 compel: travis -- Disable exec tests
Not supported for a while.

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-14 23:58:20 +03:00
Cyrill Gorcunov
b204b1e39f compel: criu -- Use sole syscalls object instead of std plugin
@std plugin known to fail when trying to execute,
investigating now. Meanwhile to not block tests
lets use syscalls object file.

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-14 23:58:20 +03:00
Cyrill Gorcunov
19fadee9d9 compel: plugins,std -- Implement syscalls in std plugin
And use it in CRIU directly instead:

 - move syscalls into compel/arch/ARCH/plugins/std/syscalls
 - drop old symlinks
 - no build for 32bit on x86 as expected
 - use std.built-in.o inside criu directly (compel_main stub)
 - drop syscalls on x86 criu directory, I copied them already
   in first compel commist, so we can't move them now, but
   delete in place

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-14 23:58:20 +03:00
Cyrill Gorcunov
35726a7667 compel: criu -- Start using uapi/std syscalls stubs
Real syscalls generation is inside criu for a while
but will be moved out in the next patch.

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-14 23:58:20 +03:00
Cyrill Gorcunov
55bc551846 compel: plugins,std -- Prepare stubs to use syscalls
CRIU will reference to them, but for now they are just stubs.

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-14 23:58:20 +03:00
Cyrill Gorcunov
e0697f780d compel: plugins,std -- Add syscall-types.h header
Both std and criu will use it for syscalls sake.
Note I've to disable x86 compat mode for a while:
we have to provide native types there thus will
back once everything else is complete.

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-14 23:58:11 +03:00
Cyrill Gorcunov
0264fdcc3a compel: plugins, std -- Add headers stubs
- linkage.h points to CRIU's asm specific
 - prologue.h is just a link to x86, we will need to
   fix it when start using std with other plugins

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-14 23:58:11 +03:00
Cyrill Gorcunov
a2e5b769e5 compel: Define separate targtes for plugins
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-14 23:58:11 +03:00
Cyrill Gorcunov
34c8ef4a14 compel: plugins, std -- Use compel_plugin entry point routine name
Plain "main" makes compilers unhappy since it's
known predefined name.

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-14 23:58:11 +03:00
Cyrill Gorcunov
642f990d15 compel: Split host and lib files
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-14 23:58:11 +03:00
Dmitry Safonov
31b11262da make: define CONFIG_COMPAT on mrproper/clean
As it's a make/build option, the set of files to compile depends
on it. We don't do feature tests on mrproper/clean (no point in it).
Let's define CONFIG_COMPAT for those targets, so compiled files
will be properly cleaned.

Reported-by: Adrian Reber <adrian@lisas.de>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
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>
2017-03-14 23:58:10 +03:00
Dmitry Safonov
e2fb30d076 make, soccr: let CRIU depend on libsoccr
As -lsoccr now is in $(LIBS) in Makefile.packages, it should be
build before criu objects. Otherwise, we try to compile
feature-tests with $(LIBS) and the succesful features fails with:
  <stdin>:1:25: warning: extra tokens at end of #include directive
  /usr/bin/ld: cannot find -lsoccr
  collect2: error: ld returned 1 exit status
Which lead to later problems:
  criu/sk-tcp.c:50:8: error: redefinition of 'struct tcp_repair_opt'
   struct tcp_repair_opt {
          ^
  In file included from criu/sk-tcp.c:1:0:
  /usr/include/netinet/tcp.h:259:8: note: originally defined here
   struct tcp_repair_opt
Because of fails in really-sucessful feture-tests.

P.S.
Maybe we should unbound feature-tests compilation from $(LIBS),
specified in Makefile.packages - that looks right after all.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14 23:58:10 +03:00
Cyrill Gorcunov
e44320ec77 compel: handle-elf-32 needed for x86 only
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-14 23:58:10 +03:00
Cyrill Gorcunov
11282c6084 compel: test -- Disable compel tests for a while
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-14 23:58:10 +03:00
Cyrill Gorcunov
fbd6582c5a compel: Add missing symlinks for host elf handling
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-14 23:58:10 +03:00
Cyrill Gorcunov
c4030e283b compel: criu -- Use compel-host program
compel-host is needed to build criu itself and
run during piegen blob generation.

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-14 23:58:10 +03:00
Cyrill Gorcunov
f20a124269 compel: Build host program
The default compel binary is the one compiled for target architecture.
The compel-host one is compel compiled for current arch that is needed
to build something for target arch.

We could use default compel if target arch == current arch, but this
makes things more complex.

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-14 23:58:10 +03:00
Cyrill Gorcunov
1f560c5f0c compel: Get rid of old piegen code
Use new compel.h header with appropriate types.

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-14 23:58:10 +03:00