[CRIU] [PATCHv2 00/22] Rectify 32-bit compatible C/R on x86

Dmitry Safonov dsafonov at virtuozzo.com
Wed Dec 7 09:56:15 PST 2016


Changes since v1:
o reworked TLS part: need to call get_thread_area on 32-bit addr.

This patches set not only fixes anything that was broken on
separation of libcompel, but also makes refactor to previous
attempt for compat C/R on 32-bits.
Mostly, it's about dropping the second 32-bit parasite (yay!).
That also contains patches to revert serialization of compat
parasite replies (oh yeah!).

Works on v4.9 kernel.
Some work for vzkernel is needed: [vvar] isn't present there
and some whatnot.

The next thing to do - enable testing :)

Dmitry Safonov (22):
  x86/asm: move user code selector values to common
  x86/parasite-head: add 32-bit parasite entry
  criu/pie/vdso: change CONFIG_{X86_32 => VDSO_32}
  criu/pie: rename native.lib.a into pie.lib.a
  pie.lib: drop second compat lib
  criu/pie: drop second compat parasite
  page-pipe/page-xfer: remove PP_COMPAT (compatible iovs)
  criu/compat: remove serialization of parasite's answers
  Revert "parasite: add parasite-compat.h & convert parasite.h types"
  compat: check arch_prctl() return code for ARCH_MAP_VDSO_32
  vdso: separate vdso_parse_maps() from vdso_fill_self_symtable()
  vdso: separate validation from vdso_fill_self_symtable()
  vdso: fill compat symtab in CRIU
  vdso/compat: parse compat vdso at vdso_init()
  restorer/vdso: use compat vdso symtab in restorer
  util: use PROC_SELF in vaddr_to_pfn() for open_proc()
  vdso: do not try to fill symtable for compat tasks in parasite
  x86/restorer/tls: simplify restoring of TLS
  kdat: check compat support by EEXIST error
  parasite/x86: always try to dump TLS
  x86/parasite: call get_thread_area on 32-bit addr
  x86: enable compatible 32 C/R back

 .gitignore                                  |   2 +-
 Makefile.config                             |  16 +-
 compel/arch/x86/plugins/std/parasite-head.S |  17 ++-
 criu/Makefile                               |   6 +-
 criu/Makefile.crtools                       |   2 +
 criu/arch/x86/call32.S                      |   3 -
 criu/arch/x86/crtools.c                     |  12 +-
 criu/arch/x86/include/asm/compat.h          |  44 ++++++
 criu/arch/x86/include/asm/parasite.h        |  56 +++++--
 criu/arch/x86/include/asm/restorer.h        |  13 +-
 criu/arch/x86/restorer.c                    |  36 ++---
 criu/arch/x86/sigaction_compat.c            |  20 +--
 criu/cr-dump.c                              |  35 ++---
 criu/cr-restore.c                           |  13 +-
 criu/include/page-pipe.h                    |   7 -
 criu/include/parasite-compat.h              |  86 -----------
 criu/include/parasite-syscall.h             |   4 +-
 criu/include/parasite-vdso.h                |   5 +-
 criu/include/parasite.h                     |  75 +++++-----
 criu/include/util-vdso.h                    |  11 +-
 criu/include/vdso.h                         |   1 +
 criu/mem.c                                  |   2 -
 criu/page-pipe.c                            |  51 +------
 criu/page-xfer.c                            |  24 +--
 criu/parasite-syscall.c                     | 206 +++++++++----------------
 criu/pie-util-vdso-elf32.c                  |   1 +
 criu/pie/Makefile                           | 133 ++++-------------
 criu/pie/Makefile.library                   |  47 ++----
 criu/pie/parasite-blob.h                    |   5 -
 criu/pie/parasite-vdso.c                    |  34 +----
 criu/pie/parasite.c                         |  12 +-
 criu/pie/restorer.c                         |   9 +-
 criu/pie/util-vdso.c                        |   2 +-
 criu/util.c                                 |   2 +-
 criu/vdso.c                                 | 224 +++++++++++++++++++++++++---
 include/common/arch/x86/asm/linkage.h       |   3 +
 36 files changed, 559 insertions(+), 660 deletions(-)
 create mode 100644 criu/arch/x86/include/asm/compat.h
 delete mode 100644 criu/include/parasite-compat.h
 create mode 120000 criu/pie-util-vdso-elf32.c
 delete mode 100644 criu/pie/parasite-blob.h

-- 
2.10.2



More information about the CRIU mailing list