mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
Move vma prot setup into parsing helper
To shrink restorer code. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
35502c4564
commit
83c209ef07
@ -217,9 +217,6 @@ self_len_end:
|
||||
if (!(vma_entry.status & VMA_AREA_REGULAR))
|
||||
continue;
|
||||
|
||||
if (vma_entry.status & VMA_AREA_STACK)
|
||||
vma_entry.prot |= PROT_GROWSDOWN;
|
||||
|
||||
#if 0
|
||||
vma_entry.fd = -1UL; /* for a while */
|
||||
vma_entry.pgoff = 0;
|
||||
|
12
util.c
12
util.c
@ -329,16 +329,18 @@ int parse_maps(pid_t pid, struct list_head *vma_area_list, bool use_map_files)
|
||||
|
||||
vma_area->vma.status = 0;
|
||||
|
||||
if (strstr(big_buffer, "[stack]"))
|
||||
if (strstr(big_buffer, "[stack]")) {
|
||||
vma_area->vma.status |= VMA_AREA_REGULAR | VMA_AREA_STACK;
|
||||
else if (strstr(big_buffer, "[vsyscall]"))
|
||||
vma_area->vma.prot |= PROT_GROWSDOWN;
|
||||
} else if (strstr(big_buffer, "[vsyscall]")) {
|
||||
vma_area->vma.status |= VMA_AREA_VSYSCALL;
|
||||
else if (strstr(big_buffer, "[vdso]"))
|
||||
} else if (strstr(big_buffer, "[vdso]")) {
|
||||
vma_area->vma.status |= VMA_AREA_VDSO;
|
||||
else if (strstr(big_buffer, "[heap]"))
|
||||
} else if (strstr(big_buffer, "[heap]")) {
|
||||
vma_area->vma.status |= VMA_AREA_REGULAR | VMA_AREA_HEAP;
|
||||
else
|
||||
} else {
|
||||
vma_area->vma.status = VMA_AREA_REGULAR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some mapping hints for restore, we save this on
|
||||
|
Loading…
x
Reference in New Issue
Block a user