2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

cr: don't touch VM above TASK_SIZE.

VM above TASK_SIZE is read-only but some areas are mapped on ARM
into the process address space.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Alexander Kartashov
2013-01-09 17:23:48 +04:00
committed by Pavel Emelyanov
parent 7758a43bd7
commit aa9ea9209e
3 changed files with 14 additions and 0 deletions

View File

@@ -245,4 +245,6 @@ typedef struct {
# define MADV_DONTDUMP 16
#endif
#define TASK_SIZE ((1UL << 47) - 1)
#endif /* __CR_ASM_TYPES_H__ */

View File

@@ -591,6 +591,9 @@ int parasite_dump_pages_seized(struct parasite_ctl *ctl, struct list_head *vma_a
continue;
}
if (vma_area->vma.end > TASK_SIZE)
continue;
ret = parasite_execute(PARASITE_CMD_DUMPPAGES, ctl);
if (ret) {
pr_err("Dumping pages failed with %d\n", ret);

View File

@@ -466,6 +466,9 @@ long __export_restore_task(struct task_restore_core_args *args)
}
}
if (vma_entry->end >= TASK_SIZE)
continue;
if (vma_entry->end > premmapped_end) {
if (vma_entry->start < premmapped_end)
addr = premmapped_end;
@@ -488,6 +491,9 @@ long __export_restore_task(struct task_restore_core_args *args)
if (!vma_priv(vma_entry))
continue;
if (vma_entry->end >= TASK_SIZE)
continue;
if (vma_entry->start > vma_entry->shmid)
break;
@@ -505,6 +511,9 @@ long __export_restore_task(struct task_restore_core_args *args)
if (!vma_priv(vma_entry))
continue;
if (vma_entry->start > TASK_SIZE)
continue;
if (vma_entry->start < vma_entry->shmid)
break;