- 01 Jun, 2013 2 commits
-
-
Alexander Kartashov authored
This patch adds the test static/arm-neon00 modelled after the test static/fpu00: it initializes ARM NEON registers before a checkpoint, carries out a simple computation on ARM NEON after a restore and compares the result against the result of the same computation carried out before a checkpoint. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
A struct sigframe* instead of fpu_state_t should be passed to the routine restore_fpu() since FPU registers are stored in different fields of the sigframe in different architectures. An architecture-specific implementation of the routine restore_fpu() should know details of this layout instead of construct_sigframe(). This change makes it possible to move ARM FPU restoration from sigreturn_prep_fpu_frame() (where it caused a segfault since the pointer fpu_stat has become invalid in the dumper address space) to restore_fpu() Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Acked-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 31 May, 2013 11 commits
-
-
Andrey Vagin authored
After creating namespaces we may need to apply some configuration. For example uid and gid maps should be applied in this moment. This script should be executed from crtools, but namespaces are created in a root process, so we need to add a new stage for synchronizing. v2: use a separate stage instead of socketpair. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The names of these functions should be swapped to avoid confusion. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Acked-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The macro REG_SYSCALL_NR is designated to get the value of the CPU register storing syscall number in a machine-independent way. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The field user_regs_struct_t::ARM_ORIG_r0 isn't used to prevent a syscall restart on ARM unlike x86. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Reported-by:
Chanho Park <chanho61.park@samsusng.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
parasite_fixup_vdso is not worth calling on arm at all, moreover it might try to read pfn for addresses greater than TASK_SIZE, leading to dump interruption. Lets make it arch dependent. [alekskartashov@: Fix compiling on arm] Reported-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
- gather structs at top - add externs - align arguments in declarations Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It will be needed in x86/ code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> CC: Chanho Park <chanho61.park@samsung.com> CC: Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by:
Chanho Park <chanho61.park@samsung.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Note it can be overriden from command line. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> CC: Chanho Park <chanho61.park@samsung.com> CC: Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by:
Chanho Park <chanho61.park@samsung.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 30 May, 2013 6 commits
-
-
Andrey Vagin authored
because we want to know when one of the sides closed its point. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Chanho Park authored
This patch adds macro for getting IP register which differs according to architecture. Signed-off-by:
Chanho Park <chanho61.park@samsung.com> Signed-off-by:
Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Chanho Park authored
This patch fixes below typecasting error: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Werror=format] Signed-off-by:
Chanho Park <chanho61.park@samsung.com> Signed-off-by:
Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Chanho Park authored
This patch fixes build error due to lack of bool type. It can be fixed adding include file. In file included from arch/arm/vdso-pie.c:3:0: include/vdso.h:41:1: error: unknown type name ‘bool’ include/vdso.h:93:1: error: unknown type name ‘bool’ Signed-off-by:
Chanho Park <chanho61.park@samsung.com> Signed-off-by:
Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Chanho Park authored
This patch fixes below typecast error: error: assignment makes integer from pointer without a cast [-Werror] Signed-off-by:
Chanho Park <chanho61.park@samsung.com> Signed-off-by:
Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by:
Alexander Karatshov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Chanho Park authored
This patch adds missing syscalls for arm. Commit '595b772a' uses these syscall for daemon mode. Signed-off-by:
Chanho Park <chanho61.park@samsung.com> Signed-off-by:
Myungjoo Ham <myungjoo.ham@samsung.com> Acked-by:
Alexander Karatshov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 May, 2013 1 commit
-
-
Cyrill Gorcunov authored
While being extracting common part of image descriptors to separate file this declaration escaped me. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 May, 2013 4 commits
-
-
Cyrill Gorcunov authored
Move image object descriptors to own image-desc file(s). This allow to reuse the code in other tools. I had to move show declarations to cr-show.h as well. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Move protobuf object descriptors to own protobuf-desc file(s). This allow to reuse the code in other tools. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We have global instance of them, that's enough. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 27 May, 2013 9 commits
-
-
Andrey Vagin authored
It was required for daemonized threads. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
For dumping thread we need to execute only one command, so its demonization is overload. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently we use id to get pid and other properties, which used when a thread is daemonized. We are going to not demonize threads, so pid will be only one useful field on parasite_thread_ctl. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
regs_orig is a pointer on struct user_task_regs Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Use original registers, which belong to the executing thread. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
rhel6 compiler is not happy about preliminary declaration of VmaEntry type yielding error on building attempt, thus include protobuf header. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Otherwise when get used outside of criu code | ../../arch/x86/include/asm/fpu.h:98:2: error: unknown type name ‘bool’ Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Otherwise kernel is not happy with attempt to write rx only memory, causing dumpee to fail on restore. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 24 May, 2013 7 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This patch reduces a window, when a crtools can kill a dumped process, because if a parasite in a deamon mode can restore the state of the process, if crtools detached unexpectedly. All threads are synchronized on the _exit_ point from sys_rt_sigreturn, for that crtools traces all syscalls. After that we remove the parasite blob from dumpee as we did it previously and let the process run further. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We're about to implement functionality to allow parasite to return to dumpee via sigreturn in case crtools suddenly detached from it. Thus, we need a space for sigframe in shared area. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This mask should be put into sigframe (used by parasite, coming soon) thus we have to pull one from dumpee early. Plus, check that signals are blocked for each thread separately Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Parasite daemon mode it quite tricky. One may consider it as consisting of two parts - daemon mode for thread leader - daemon mode for regular threads Thread leader daemon -------------------- Once thread leader parasite code switched initialized, it starts spinning on socket listening for commands to handle. If the command destination is the thread leader itself it handles it and replies back the ack to the caller (iow the main crtools code). If the recepient is not thread leader but one of threads, then thread leader wakes up the thread by futex and makes it to handle the command waiting on futex for result. Once result obtained, the ack is being sending back to caller. Thread daemon ------------- On initialization thread daemon starts waiting a command on futex. The futex is triggered by thread leader daemon when command received. Once command is received and handled, the result is reported back to the thread leader daemon, which in turn send ack message. Both thread-leader and regular threads require own stack to operate on since they all are present in memory simultaneously. Thus we use call_daemon_thread() helper which takes care of providing stack to the callee. TODO: - ARM requires own wrappers on damonize/trap low-level code, at moment x86-64 is only covered v2: remove PARASITE_CMD_DAEMONIZED and s->ack parasite: use a propper command for getting ack Fixed-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's autogenerated file. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Parasite daemon mode might be considered as a series of network messages sent from main crtools module to parasite daemon which spins on a socket waiting for command to handle. Simple command handling session might look as crtools daemon | | | | ---> command message ---> | | | | ---> receive command ---> | | | .... | | | handle command | | | .... | | | <--- send ack <--- | | <--- receive ack <--- | | | | | v v v time where, in case of multithread application [handle command] stage includes waking up of children threads via futexes, wait until handling complete and only then send ack back to ctrools module. This patch brings in description of command message as struct ctl_msg { unsigned int id; /* command recipient */ unsigned int cmd; /* command itself */ unsigned int ack; /* ack on command */ int err; /* error code on reply */ }; For example, in case of dumpee being with pid 2 and acquiring to handle PARASITE_CMD_DUMP_MISC, the command/ack series will look as cmd-msg ------- .id = 2, .cmd = PARASITE_CMD_DUMP_MISC, .ack = 0, .err = 0, ack-msg ------- .id = 2, .cmd = PARASITE_CMD_DUMP_MISC, .ack = PARASITE_CMD_DUMP_MISC, .err = 0 in case if error happened in parasite, the @err field set accordingly. For convenience ctl_msg_cmd()/ctl_msg_ack() macros are provided for control message generations. v2: delete futex_t ack from tid_state_s Fixed-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-