[Devel] [PATCH 00/11] x86: C/R for ia32 tasks

Dmitry Safonov dsafonov at virtuozzo.com
Thu May 18 11:39:39 PDT 2017


Here are:
- Adjustments to ms API for arch_prctl(ARCH_MAP_VDSO_32).
- Rework of my ms kernel patch for mremapping vdso to vzkernel
  (vdso part was rewritten in ~v3.16 so here is a bycicle for older kernel)
- Fix for mmap() bug which resulted in returning pointer over 4GB for
  ia32 syscalls (the largest part of the set).

With those patches + 1 additional patch to vz-criu (u5 branch),
it's possible to C/R ia32 CTs.
I've sent the patch to criu-ml, it's trivial and affects only ia32 C/R,
so soon I'll apply it to the vz7-u5 branch.

There are two issues known to me:
- zdtm autofs test (it hangs, so no C/R was tested).
- vsyscall page appears on all 32-bit tasks after C/R.
  It's emulated, placed over 4Gb, so the only side-effect is
  for applications, reading /proc/.../maps and those are not
  ready to meet such mapping (such applications not known to me).

I've tested C/R on centos-6-x86 ia32 container with vzctl,
all looks fine to me.

Dmitry Safonov (9):
  x86/vdso/prctl: fail if vdso present in ARCH_MAP_VDSO_32
  x86/mm: Support mremap()'ing vdso vma
  x86/vdso/prctl: Return size of vdso blob for ARCH_MAP_VDSO_32
  ms/x86/mm: Introduce arch_rnd() to compute 32/64 mmap random base
  ms/x86/mm: Add task_size parameter to mmap_base()
  ms/x86/mm: Introduce mmap_compat_base() for 32-bit mmap()
  ms/x86/mm: Make mmap(MAP_32BIT) work correctly
  ms/x86/hugetlb: Adjust to the new native/compat mmap bases
  x86/mm: Make in_compat_syscall() work during exec

Kees Cook (2):
  ms/x86: standardize mmap_rnd() usage
  ms/mm: expose arch_mmap_rnd when available

 arch/Kconfig                         |  15 ++++
 arch/x86/Kconfig                     |   2 +
 arch/x86/include/asm/Kbuild          |   1 -
 arch/x86/include/asm/elf.h           |  33 ++++-----
 arch/x86/include/asm/mm-arch-hooks.h |  20 ++++++
 arch/x86/include/asm/processor.h     |   4 +-
 arch/x86/kernel/process_64.c         |  67 ++++++++++++------
 arch/x86/kernel/sys_x86_64.c         |  15 ++--
 arch/x86/mm/hugetlbpage.c            |   9 ++-
 arch/x86/mm/mmap.c                   | 129 +++++++++++++++++++++++------------
 arch/x86/vdso/vdso32-setup.c         |  49 +++++++++----
 include/linux/elf-randomize.h        |  10 +++
 include/linux/mm.h                   |   2 +
 include/linux/mm_types.h             |   5 ++
 mm/mmap.c                            |  20 ++++++
 15 files changed, 277 insertions(+), 104 deletions(-)
 create mode 100644 arch/x86/include/asm/mm-arch-hooks.h
 create mode 100644 include/linux/elf-randomize.h

-- 
2.12.2



More information about the Devel mailing list