[CRIU] [PATCH 0/9] pie/util-vdso refactoring

Dmitry Safonov dsafonov at virtuozzo.com
Wed Mar 30 08:12:21 PDT 2016


This should come as a part of compat patches set, but as
I have saw vdso_fill_symtable I couldn't refrain from
refactoring that.

The first patch may be yet not needed, but as all following
patches were based on it, I send with it.
The second is not only about dropping undefined behavior, but
also made code more readable from my point of view.
The fith patch adds checking that we can dereference structure
from pointer from Elf header (before it checked that
the pointer lay in needed memory region, but not pointer's
structure member addresses).
The last three patches are mere cleanups.

The patches set was tested with Travis, but as criu-dev
is broken now, build for ARM/Aarch64 failed:
https://travis-ci.org/0x7f454c46/criu/builds/119550125
Anyway, it was tested on the top of compatible patches
set and the build for ARM/Aarch64 succeed:
https://travis-ci.org/0x7f454c46/criu/builds/119546598

Dmitry Safonov (9):
  pie: make util-vdso a little less 64-specific
  pie/util-vdso: down with UB in __ptr_oob
  pie/util-vdso: separate has_elf_identity
  pie/vdso: convert (char *mem) to (uintptr_t mem)
  pie/util-vdso: check elf structure end oob
  string.h/pie: use builtin strncmp instead of strcmp
  pie/util-vdso: split parse_elf_phdr from vdso_fill_symtable
  pie/util-vdso: split parse_elf_dynamic from vdso_fill_symtable
  pie/util-vdso: split parse_elf_symbols from vdso_fill_symtable

 criu/include/asm-generic/string.h |  18 ++-
 criu/include/parasite-vdso.h      |   1 -
 criu/include/util-vdso.h          |  30 ++++-
 criu/pie/parasite-vdso.c          |   3 +-
 criu/pie/parasite.c               |   2 +-
 criu/pie/util-vdso.c              | 243 +++++++++++++++++++++++++++-----------
 criu/vdso.c                       |   2 +-
 7 files changed, 213 insertions(+), 86 deletions(-)

-- 
2.7.4



More information about the CRIU mailing list