No description
Find a file
Dmitry Safonov d7c86c8b02 arm32/Makefile: fix readable mappings getting +x
Flag `noexecstack' for ld implies `EXSTACK_DISABLE_X' ELF flag
on CRIU binary. Without this flag the kernel ELF loader will set
`READ_IMPLIES_EXEC' personality bit:
>	if (elf_read_implies_exec(loc->elf_ex, executable_stack))
>		current->personality |= READ_IMPLIES_EXEC;

This flag is checked by sys_mmap():
>	if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
>		if (!(file && path_noexec(&file->f_path)))
>			prot |= PROT_EXEC;

Which results in each mmap() syscall returning +x mapping for any
readable mapping for CRIU binary, e.g:
Before C/R:
76fc4000-76fc5000 r--p 0001f000 b3:02 131656     /usr/lib/ld-2.25.so
76fc5000-76fc6000 rw-p 00020000 b3:02 131656     /usr/lib/ld-2.25.so
After restore:
76fc4000-76fc5000 r-xp 0001f000 b3:02 131656     /usr/lib/ld-2.25.so
76fc5000-76fc6000 rwxp 00020000 b3:02 131656     /usr/lib/ld-2.25.so

Which also makes ZDTM very sad:
1: Old maps lost: set(["76f80000-76f81000 ['rw-p', '0120400']", "25000-26000
['rw-p', '0120400']", "76f7d000-76f7f000 ['rw-p']", "14a8000-14c9000 ['rw-p']",
"76f4a000-76f4c000 ['r--p', '0120400']", "7ed3d000-7ed7f000 ['rw-p']",
"76f7f000-76f80000 ['r--p', '0120400']", "24000-25000 ['r--p', '0120400']",
"76f4c000-76f50000 ['rw-p', '0120400']"])
1: New maps appeared: set(["76f7f000-76f80000 ['r-xp', '0120400']",
"7ed3d000-7ed7f000 ['rwxp']", "76f4a000-76f4c000 ['r-xp', '0120400']",
"76f80000-76f81000 ['rwxp', '0120400']", "24000-25000 ['r-xp', '0120400']",
"14a8000-14c9000 ['rwxp']", "25000-26000 ['rwxp', '0120400']",
"76f7d000-76f7f000 ['rwxp']", "76f4c000-76f50000 ['rwxp', '0120400']"])

Maybe we also need to set it for arm64 or even for all archs, but that
needs to be tested in the first place, so add it now to arm32, x86
already has it.

Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-17 18:35:58 +03:00
compel arm/compel: add generated headers to .gitignore 2017-04-17 18:35:58 +03:00
contrib scripts/install-debian-packages: add libnet-dev 2017-01-16 11:04:49 +03:00
coredump python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
crit python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
criu arm32/Makefile: fix readable mappings getting +x 2017-04-17 18:35:58 +03:00
Documentation .gitignore: update to recent changes 2017-03-14 21:03:22 +03:00
images crit: Beautify unix names recode 2017-04-11 09:01:11 +03:00
include/common x86/asm: move user code selector values to common 2017-03-15 00:06:17 +03:00
lib python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
scripts python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
soccr soccr: Print errors in send_fin (v2) 2017-04-11 08:59:16 +03:00
test python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
.gitignore .gitignore: remove a leftover 2017-04-02 18:12:10 +03:00
.mailmap repo: Add mailmap file 2012-03-25 23:31:20 +04:00
.travis.yml travis: run tests with asan 2017-04-11 09:00:49 +03:00
COPYING COPYING: fix a typo in a preamble 2016-08-11 16:18:43 +03:00
CREDITS Add the CREDITS file 2012-07-30 13:52:37 +04:00
INSTALL.md Makefile.install: rm unused vars/target 2017-02-06 13:48:49 +03:00
Makefile Makefiles: protect from % rules, don't rebuild 2017-03-15 09:36:08 +03:00
Makefile.compel compel: make plugins .a archives 2017-04-02 18:12:10 +03:00
Makefile.config Makefiles: nuke $(SRC_DIR) 2017-03-15 09:36:08 +03:00
Makefile.install Makefiles: remove @true 2017-03-15 09:36:08 +03:00
Makefile.versions compel: build -- Add @sublevel 2017-03-14 23:58:08 +03:00
README.md Add ascciinema tour on basic criu features. 2016-06-16 16:37:06 +03:00

CRIU (Checkpoint and Restore in Userspace)

An utility to checkpoint/restore tasks. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space.

The project home is at http://criu.org.

Pages worth starting with are:

A video tour on basic CRIU features

CRIU introduction

How to contribute