[CRIU] [PATCH 6/9] parasite: Prepare to allocate args for page maps
Pavel Emelyanov
xemul at parallels.com
Fri Mar 1 11:03:39 EST 2013
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
parasite-syscall.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/parasite-syscall.c b/parasite-syscall.c
index 5bfa12f..d57fa92 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -482,6 +482,11 @@ int parasite_dump_creds(struct parasite_ctl *ctl, CredsEntry *ce)
return 0;
}
+static unsigned int vmas_pagemap_size(struct vm_area_list *vmas)
+{
+ return 0;
+}
+
/*
* This routine drives parasite code (been previously injected into a victim
* process) and tells it to dump pages into the file.
@@ -770,11 +775,12 @@ int parasite_map_exchange(struct parasite_ctl *ctl, unsigned long size)
return 0;
}
-static unsigned long parasite_args_size(struct parasite_drain_fd *dfds)
+static unsigned long parasite_args_size(struct vm_area_list *vmas, struct parasite_drain_fd *dfds)
{
unsigned long size = PARASITE_ARG_SIZE_MIN;
size = max(size, (unsigned long)drain_fds_size(dfds));
+ size = max(size, (unsigned long)vmas_pagemap_size(vmas));
return size;
}
@@ -796,7 +802,7 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, struct pstree_item *item,
* without using ptrace at all.
*/
- ctl->args_size = parasite_args_size(dfds);
+ ctl->args_size = parasite_args_size(vma_area_list, dfds);
ret = parasite_map_exchange(ctl, parasite_size + ctl->args_size);
if (ret)
goto err_restore;
--
1.7.11.7
More information about the CRIU
mailing list