[CRIU] [PATCH 00/15] Unmap restorer blobs after restoring processes (v3)

Andrey Vagin avagin at openvz.org
Mon Sep 23 06:33:23 EDT 2013


The same way is used for unmaping restorer and parasite blobs.

The code for unmaping is saved on the target blob and the process
is trapped on the exit from the munmap syscall.

The main profit is that we don't need to inject code in a process memory.
In addition we don't need to collect process vma-s to find a place
for injecting code.

v2: Don't use software breakpoints
    Clean up here and there
v3: * attach to each thread separately
    * rework unmaping old VMA-s
    * add check that a process has the same set of VMS-s after restore

Here are a few new patches:
[PATCH 08/15] proc: allow parse_thread to use an existent buffer
[PATCH 09/15] pstree: initialize real pid to -1 for threads on restore
[PATCH 14/15] restorer: rework unmaping old VMA-s (v3)
[PATCH 15/15] zdtm: check that a process has the same set of VMS-s after restore



Andrey Vagin (15):
  restore: allocate pstree items from a shared pool (v2)
  restore: get real pid for each task (v2)
  parasite: stop task on exit from a specified syscall
  parasite: allow to wait more than one process on the exit from syscall
  parasite: prep_ctl doesn't search place for syscall if vma_list is
    NULL
  parasite: add a function for unmaping bootstrap blob
  parse_proc: move parse_threads from cr-dump.c
  proc: allow parse_thread to use an existent buffer
  pstree: initialize real pid to -1 for threads on restore
  restore: save a task state on pstree_item
  restore: catch task on the exit from sigreturn (v4)
  restorer: unmap itself (v2)
  parasite: unmap itself (v2)
  restorer: rework unmaping old VMA-s (v3)
  zdtm: check that a process has the same set of VMS-s after restore

 cr-dump.c                  |  43 +-----------
 cr-restore.c               | 160 +++++++++++++++++++++++++++++++++++++++++----
 files.c                    |   1 +
 include/crtools.h          |   5 +-
 include/parasite-syscall.h |   2 +
 include/parasite.h         |   6 ++
 include/proc_parse.h       |   3 +
 include/restorer.h         |   4 +-
 parasite-syscall.c         | 144 ++++++++++++++++++++++++++++++----------
 pie/parasite.c             |  16 +++++
 pie/restorer.c             | 120 +++++++++++++++++++---------------
 proc_parse.c               |  45 +++++++++++++
 pstree.c                   |  17 +++--
 test/maps.py               |  16 +++++
 test/zdtm.sh               |  25 ++++++-
 15 files changed, 457 insertions(+), 150 deletions(-)
 create mode 100644 test/maps.py

--
1.8.3.1



More information about the CRIU mailing list