criu/lib/pycriu
Bhavik Sachdev 7daaa11aa0 mem: don't PROT_WRITE on reservation mmaps
An application might call mmap with PROT_NONE to reserve a large amount
of the virtual address space. Something like:

void *addr = mmap(NULL, SIZE, PROT_NONE,
	      MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);

During restore, when we have to premap private vmas (ie pieok is false),
CRIU tries to mmap this large PROT_NONE and fails.

If a vma has never been written to, it does not have "ac" flag set. Use
this fact to safely premap vmas that were done for address reservation.

Suggested-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Bhavik Sachdev <b.sachdev1904@gmail.com>
2026-05-07 11:45:34 -07:00
..
images mem: don't PROT_WRITE on reservation mmaps 2026-05-07 11:45:34 -07:00
.gitignore lib: use separate packages for pycriu and crit 2023-11-27 16:47:16 -08:00
__init__.py pycriu: Force python protobuf backend in 3.14+ 2026-03-12 09:12:45 +00:00
criu.py pycriu: Fix self-dump failure with explicit PID 2026-01-21 00:25:29 +00:00
Makefile lib: use separate packages for pycriu and crit 2023-11-27 16:47:16 -08:00