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>
It's needed to keep singnal handlers on
disk with predefined format.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
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>
v2:
- Pavel reported there is no need to lock/unlock
last-pid file in cycle, just lock it once before
threads creation and unlock at the end.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
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>
It has been used at very early stage when
no mincore call was implemented. Not needed
anymore -- so drop it out.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reduce the pages-xxx.img file size significantly (from 2.1M to ~100K for simple counter test)
by not dumping private file pages, that have not yet changed from its file prototype.
If you'll have problems with it, just let me know and comment the definition of PAGE_ANON not
to block your work.
This uses the implemented earlier flag from mincore.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This one isn't used on restore process, since the file mapped is
stored in the fdinfo part of the images.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
It's pointless. All vmas are stored in the per-pid image file.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Otherwise the dumpee migh be unable to locate it.
Reported-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
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>
Threads are better to be restored in serialized
way otherwise if some error happened an error
message will be screwed.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
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>