[CRIU] [PATCH] predump: Spot the VDSO page/vma in victim task
Pavel Emelyanov
xemul at parallels.com
Tue Jan 14 00:03:50 PST 2014
While doing pre-dump we don't do proper VDSO fixups, thus at
this stage we may fail the should_dump_page() checks -- it
will tread VDSO pages are 'regular' and may skip dumping some
of them.
This is not bad as is, but the subsequent dump will properly
spot VDSO are and will try to dump _all_ pages from it. And
if checks for soft-dirty will report that some pages are clean,
dump will try to locate those in parent images and would fail.
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
diff --git a/cr-dump.c b/cr-dump.c
index 7a06279..4c54eb5 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1334,6 +1334,12 @@ static int pre_dump_one_task(struct pstree_item *item, struct list_head *ctls)
goto err_free;
}
+ ret = parasite_fixup_vdso(parasite_ctl, pid, &vmas);
+ if (ret) {
+ pr_err("Can't fixup vdso VMAs (pid: %d)\n", pid);
+ goto err_cure;
+ }
+
ret = parasite_dump_misc_seized(parasite_ctl, &misc);
if (ret) {
pr_err("Can't dump misc (pid: %d)\n", pid);
@@ -1612,6 +1618,9 @@ int cr_pre_dump_tasks(pid_t pid)
if (kerndat_init())
goto err;
+ if (vdso_init())
+ goto err;
+
if (connect_to_page_server())
goto err;
More information about the CRIU
mailing list