[CRIU] [PATCH 00/20] Parasite daemon mode, v6

Andrey Vagin avagin at openvz.org
Fri May 24 08:20:03 EDT 2013


Hi guys, here is a parasite daemon mode updated series.

v3: Main changes is that -- tsock is used for both: commands
and data transfer. arm still is not converted thus won't
be working with this series, once it's accepted we need
a few fixes to arm code.

v4:
* Fix a few minor bugs
* Block signals before dumping registers of threads
* sigreturn is used for exiting from parasite, so if crtools died
unexpectedly, all processes are able to exit from parasite code.

v5: * don't use PTRACE_SETSIGMASK, because it is not commited in the
    upstream kernel and we should be compatiable with it.
    * a few minore fixes. Look at the last patches
v6: allocate separate stack for each thread
    merge all fixes in proper patches
    resort patches
    delete all asm code

Please take a look. Thanks.

Andrey Vagin (17):
  locks: add futex_wait_while_eq
  parasite: use transparent thread indexes
  parasite: save thread registers in parasite_thread_ctl
  parasite: allocate stack for each thread
  parasite: Switch parasite to daemon mode (v2)
  dump: update task registers if a signal is started handling
  dump: save registers when the task is already infected
  dump: return signal mask from parasite on initialization
  restore: use a concrete object for constructing sigframe
  restore: add a function for constructing sigframe
  restore: split restore_gpregs on two parts
  restore: construct sigframe in crtools
  dump: fill sigblock mask immediately after getting it
  dump: reseve space and construc sigframes for parasites
  parasite: transfer a pointer on sigframe to parasite
  parasite: restore parasite state via rt_sigreturn
  restore: fix size of stack for sigframe

Cyrill Gorcunov (3):
  pstree: Bind CoreEntry to pstree and fill it with registers early
  parasite-syscall: Add "trap" postfix to parasite execute functions
  parasite: Prepare structures for daemon mode

 Makefile.crtools                        |   1 +
 arch/arm/crtools.c                      |  74 +++--
 arch/arm/include/asm/dump.h             |   2 +-
 arch/arm/include/asm/parasite-syscall.h |   2 +-
 arch/arm/include/asm/restore.h          |   2 +-
 arch/arm/include/asm/restorer.h         |   5 +-
 arch/arm/include/asm/types.h            |   2 +
 arch/arm/parasite-head.S                |  13 -
 arch/arm/restorer.c                     |  37 +--
 arch/x86/crtools.c                      |  83 ++++--
 arch/x86/include/asm/dump.h             |   2 +-
 arch/x86/include/asm/fpu.h              |   2 +
 arch/x86/include/asm/parasite-syscall.h |   2 +-
 arch/x86/include/asm/restore.h          |   2 +-
 arch/x86/include/asm/restorer.h         |   6 +-
 arch/x86/parasite-head.S                |   4 -
 arch/x86/restorer.c                     |  43 +--
 cr-dump.c                               | 137 +++-------
 cr-exec.c                               |   4 +-
 cr-restore.c                            |  12 +-
 include/lock.h                          |   4 +
 include/parasite-syscall.h              |  47 +++-
 include/parasite.h                      |  31 ++-
 include/pstree.h                        |   6 +
 include/restorer.h                      |  10 +-
 include/sigframe.h                      |   4 +
 mem.c                                   |  17 +-
 parasite-syscall.c                      | 467 ++++++++++++++++++++++++++------
 pie/parasite.c                          | 322 +++++++++++++++++-----
 pie/restorer.c                          |  11 +-
 pstree.c                                |  79 ++++++
 sigframe.c                              |  35 +++
 32 files changed, 1016 insertions(+), 452 deletions(-)
 create mode 100644 sigframe.c

--
1.8.2



More information about the CRIU mailing list