[CRIU] [PATCH 0/15] restorer: Sanitize sigreturn_restore()

Andrew Vagin avagin at virtuozzo.com
Tue May 24 13:59:34 PDT 2016


On Tue, May 24, 2016 at 02:32:15PM +0300, Pavel Emelyanov wrote:
> This routine has grown too big and messy, since lots of
> stuff require task_restore_args (and thread_restore_args)
> to be at hands. Sometimes it's handled by keeping the
> needed data somewhere and then copying it into restorer,
> sometimes by patching talis of sigreturn_restore.
> 
> This set makes first step towards making sigreturn_restore()
> being small and doing one thing -- prepare restorer memory
> layout and jumping into restorer blob. The step is -- make
> task and thead args be ready as early as required.

[root at fc22-vm criu]# python test/zdtm.py run -t zdtm/static/futex
=== Run 1/1 ================

========================== Run zdtm/static/futex in h ==========================
Start test
./futex --pidfile=futex.pid --outfile=futex.out
Run criu dump
Run criu restore
=[log]=> dump/zdtm/static/futex/24/1/restore.log
------------------------ grep Error ------------------------
(00.386982) Error (cr-restore.c:995): 24 killed by signal 11: Segmentation fault
(00.387039) Error (cr-restore.c:1872): Restoring FAILED.
------------------------ ERROR OVER ------------------------
################# Test zdtm/static/futex FAIL at CRIU restore ##################
##################################### FAIL #####################################

#0  0x000000000042aaca in prepare_aios (t=<optimized out>, ta=ta at entry=0x7f96d63b7000) at aio.c:135
135		ta->rings = (struct rst_aio_ring *)rst_mem_align_cpos(RM_PRIVATE);
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.23.1-5.fc24.x86_64 libnl3-3.2.27-3.fc24.x86_64 libselinux-2.5-3.fc24.x86_64 pcre-8.38-11.fc24.x86_64 protobuf-c-1.2.1-1.fc24.x86_64
(gdb) bt
#0  0x000000000042aaca in prepare_aios (t=<optimized out>, ta=ta at entry=0x7f96d63b7000) at aio.c:135
#1  0x00000000004399d3 in restore_one_alive_task (core=0x11a6b60, pid=<optimized out>) at cr-restore.c:510
#2  restore_one_task (core=0x11a6b60, pid=<optimized out>) at cr-restore.c:743
#3  restore_task_with_children (_arg=<optimized out>) at cr-restore.c:1329
#4  0x00007f96d52665cd in clone () from /lib64/libc.so.6



> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list