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

11 Commits

Author SHA1 Message Date
Dmitry Safonov
70b67e3383 compel: Add ctx flags to get_task_regs()
get_task_regs() needs to know if it needs to use workaround
for a Skylake ptrace() bug. The next patch will introduce a
new flag for that.
I also thought about making 3 versions of get_task_regs() and
adding them to ictx->get_task_regs() depending on the flags..
But get_task_regs() is a private function and infect_ctx is
a uapi.. So, let's just pass context flags to get_task_regs().

Signed-off-by: Dmitry Safonov <dima@arista.com>
2018-02-13 10:14:42 +03:00
Cyrill Gorcunov
6e4d05853d compel: infect -- Don't forget to fetch sas early
When infecting victim we construct sigframe to
be able to self-rectore it in case if something
goes wrong. But in case is a targer been using
alternative stack for signal handling it will
be missed in sigframe since we don't fetch it.

Thus add fetching sas on infection stage and
put it into signal frame early.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:09:34 +03:00
Dmitry Safonov
b502d7fd6b compel: pass regs by pointer in get_task_regs()
CID 73371 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Passing parameter regs of type user_regs_struct_t
(size 224 bytes) by value.

Suggesting to do this until compel is released and API is cut in stone.

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 09:36:09 +03:00
Pavel Emelyanov
909590a355 Remove criu exec code
It's now obsoleted by compel library.
Maybe-TODO: Add compel tool exec action?

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 09:36:05 +03:00
Kir Kolyshkin
1be75af874 compel_syscall(): make ret argument signed
I saw this line in the code

	unsigned long sret = -ENOSYS;

and ended up with this patch. Note syscall(2) man page says return value
is long -- who am I to disagree?

travis-ci: success for More polishing for compel cli
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
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:09:54 +03:00
Pavel Emelyanov
16080b7f6f compel: Hide compel_execute_syscall() from uapi
It uses regs caller doesn't always know and is actually a
core routine under the API compel_syscall() one.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:14 +03:00
Cyrill Gorcunov
c7a717c1d1 compel: Save and restore regs inside compel by default
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>
2017-03-15 00:06:11 +03:00
Pavel Emelyanov
a722258d59 compel: Relax the thread mgmt API
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:09 +03:00
Pavel Emelyanov
d0caedd190 compel: Hide parasite_thread_ctl
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:09 +03:00
Pavel Emelyanov
72e4804b07 compel: Prepare to hide parasite_thread_ctl
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>
2017-03-15 00:06:08 +03:00
Cyrill Gorcunov
cbe24fb9c4 compel: Move in parasite engine
This is the final patch in the series. It does a bunch
of renames and fixes headers respectively.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:06:06 +03:00