[CRIU] [PATCH 00/16] Preparations for x86-32 CRIU mode, v2

Laurent Dufour ldufour at linux.vnet.ibm.com
Fri Jun 5 01:28:39 PDT 2015


On 04/06/2015 23:04, Cyrill Gorcunov wrote:
> Hi! Here is a slightly updated version of preparatory code for
> x86-32 mostly. Which it turns out suitable as well for ppc64.
> 
> The idea is to use side tool (piegen) which parses generated
> parasite blobs and creates byte-stream of code to run with
> additional relocation data (if needed).
> 
> Previously our blobs were generated by linker but this
> doesn't work for x86 32bit due to lack of rip addressing
> so we have to switch to another scheme.
> 
> Note that at moment this code only runs if criu is built as
> 
> 	ARCH="ia32" make
> 
> Laurent what about ppc64, does piegen run always?

Hi Cyrill,

Yes, when building on ppc64le, the relocation's process is involved all
the time.

Laurent.

> 
> Also note that I didn't modify TASK_SIZE for 32bit
> need to think. But I would prefer the code to merge
> since it become harder to keep it out of three.
> 
> So, take a look, comments are welcome!
> 
> Cyrill Gorcunov (13):
>   piegen: Implement tool building, v2
>   x86: Start using native object relocatable files in parasite code
>   arch: x86-32 syscalls -- Wire in syscalls generation
>   x86: Add 32bit variant of TASK_SIZE
>   pie: x86-32 -- Build parasite code without PIC
>   pie: x86-32 -- Prepare parasite head
>   arch: x86-32 -- Be able to build 32bit CRIU
>   pie: x86 -- Adjust size of parasite and restorer code
>   pie: piegen, x86 -- Fix relocs application
>   pie: x86 -- Do a real call for applying relocations
>   pie: piegen -- Slightly rework the building procedure
>   pie: piegen -- Add PIE_SIZE helper
>   pie: Use PIE_SIZE helper
> 
> Laurent Dufour (3):
>   ppc64: pie -- Move the TOC in its own section
>   ppc64: pie -- Add ppc64le relocation's processing
>   pie: piegen -- Only copy required sections
> 
>  Makefile                                  |  29 +-
>  Makefile.crtools                          |   1 +
>  arch/ppc64/crtools.c                      |   5 +
>  arch/ppc64/include/asm/restore.h          |  13 +-
>  arch/ppc64/misc.S                         | 197 ++++++++++++
>  arch/ppc64/parasite-head.S                |  26 +-
>  arch/ppc64/restorer-trampoline.S          |  33 --
>  arch/ppc64/vdso-pie.c                     |  37 ---
>  arch/x86/Makefile                         |  18 ++
>  arch/x86/include/asm/parasite.h           |   4 +
>  arch/x86/include/asm/restore.h            |   9 +
>  arch/x86/include/asm/restorer.h           |  31 +-
>  arch/x86/include/asm/syscall32.h          |  25 ++
>  arch/x86/include/asm/types.h              |  10 +-
>  arch/x86/parasite-head.S                  |  23 ++
>  arch/x86/restorer.c                       |   3 +-
>  arch/x86/syscalls/syscall-common-x86-32.S |  36 +++
>  arch/x86/syscalls/syscall32.c             |  85 +++++
>  arch/x86/syscalls/syscall_32.tbl          |  88 ++++++
>  arch/x86/vdso-pie.c                       |  29 ++
>  cr-restore.c                              |   7 +-
>  parasite-syscall.c                        |  10 +-
>  pie/Makefile                              |  50 ++-
>  pie/parasite.c                            |   6 +-
>  pie/pie-reloc.lds.S.in                    |  30 ++
>  pie/pie-relocs.c                          |  47 +++
>  pie/pie-relocs.h                          |  17 +
>  pie/piegen/Makefile                       |  17 +
>  pie/piegen/elf-ppc64.c                    |  16 +
>  pie/piegen/elf-x86-32.c                   |  16 +
>  pie/piegen/elf-x86-64.c                   |  16 +
>  pie/piegen/elf.c                          | 495 ++++++++++++++++++++++++++++++
>  pie/piegen/main.c                         | 137 +++++++++
>  pie/piegen/piegen.h                       |  37 +++
>  pie/piegen/uapi/types.h                   |  15 +
>  35 files changed, 1511 insertions(+), 107 deletions(-)
>  create mode 100644 arch/ppc64/misc.S
>  delete mode 100644 arch/ppc64/restorer-trampoline.S
>  create mode 100644 arch/x86/include/asm/syscall32.h
>  create mode 100644 arch/x86/syscalls/syscall-common-x86-32.S
>  create mode 100644 arch/x86/syscalls/syscall32.c
>  create mode 100644 arch/x86/syscalls/syscall_32.tbl
>  create mode 100644 pie/pie-reloc.lds.S.in
>  create mode 100644 pie/pie-relocs.c
>  create mode 100644 pie/pie-relocs.h
>  create mode 100644 pie/piegen/Makefile
>  create mode 100644 pie/piegen/elf-ppc64.c
>  create mode 100644 pie/piegen/elf-x86-32.c
>  create mode 100644 pie/piegen/elf-x86-64.c
>  create mode 100644 pie/piegen/elf.c
>  create mode 100644 pie/piegen/main.c
>  create mode 100644 pie/piegen/piegen.h
>  create mode 100644 pie/piegen/uapi/types.h
> 



More information about the CRIU mailing list