2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 21:07:43 +00:00

16 Commits

Author SHA1 Message Date
Cyrill Gorcunov
ff954f655f dump: Drop unneeded #includes
This as well forces to move ptrace
definitions into ptrace.h, otherwise
freshly fetched kernel headers become
conflict with existing ptrace constants.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-19 23:18:17 +04:00
Cyrill Gorcunov
92efe1921a types: Drop user_regs_struct_t for x86-32
We don't support x86-32 yet so no need to
carry this declaration, it's only confusing.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-19 22:20:42 +04:00
Andrey Vagin
e57a4c2945 Use stderr for debug messages (v2)
Many programs use stdout for transferring data.

v2: remove debug code

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-05 12:01:23 +04:00
Cyrill Gorcunov
53c611b630 dump,restore: Use rt_sigaction_t for sys_sigaction
Since we operate with syscalls directly we are
to convert signal's structures between image and
kernel formats, without intermediate glibc layer.

Note this involves chaging sa_entry::flags to u64
(since it's long int value in kernel).

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-03 17:24:05 +04:00
Cyrill Gorcunov
2907bb2258 Move rt_sigset_t to include/types.h
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-02 23:03:03 +04:00
Andrey Vagin
04f36aed0a Set descriptors to restart a current syscall
If a task is sleep in syscall, it should be restared.
This logic is moved from kernel do_signal().

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-02 17:50:55 +04:00
Andrey Vagin
25434884e1 Dump and restore sigactions (v2)
A parasite code dumps all sigactions in sigact.pid.

v2: remove hard code for sizeof(sigset_t)

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-11-30 22:04:09 +04:00
Cyrill Gorcunov
b38205f580 Update PR_ opcodes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-21 16:47:36 +04:00
Cyrill Gorcunov
b06349fc49 prctl: Rename PR_ entries
Tejun Heo proposed to use more general names
unrelated to checkpoint-restore procedure.

So be it (maybe someone else will need this
entries as well).

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-21 12:54:14 +04:00
Cyrill Gorcunov
777dc994aa types: PTRACE_SEIZE and PTRACE_INTERRUPT already defined in ptrace.h
On linux-3.1.1 (fc16) these constants already defined in system
ptrace.h

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-20 10:31:16 +04:00
Cyrill Gorcunov
d9aa7f021c restore: Add mutexes via futex syscall and order threads creation
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-18 16:09:01 +04:00
Cyrill Gorcunov
566a900e4e restore: Use prctl for vDSO restoration
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-08 17:53:47 +04:00
Cyrill Gorcunov
da8f61c1c8 dump: Add GS-TLS handling
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-07 17:44:00 +04:00
Cyrill Gorcunov
8a8850d146 dump: Dump TLS via sys_arch_prctl
As such -- no need for kernel patch.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-07 16:29:36 +04:00
Cyrill Gorcunov
d6e7afe3d8 syscalls: Add sys_set/get_thread_area helpers
They are actually banned in kernel for now, but
we might end up needing them, so better to have
them in-place.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-07 14:47:04 +04:00
Cyrill Gorcunov
523de23624 Initial commit
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-23 12:00:45 +04:00