Commit aa9ea920 authored by Alexander Kartashov's avatar Alexander Kartashov Committed by Pavel Emelyanov

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: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7758a43b
......@@ -245,4 +245,6 @@ typedef struct {
# define MADV_DONTDUMP 16
#endif
#define TASK_SIZE ((1UL << 47) - 1)
#endif /* __CR_ASM_TYPES_H__ */
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment