[CRIU] [PATCH 2/6] compel/infect: don't copy gotpcrel with parasite's blob
Andrey Ryabinin
aryabinin at virtuozzo.com
Mon Feb 6 02:14:13 PST 2017
From: Dmitry Safonov <dsafonov at virtuozzo.com>
We don't need gotpcrel inside parasite's blob:
we handle relocations over remote map in compel library,
reading them from parasite's blob header.
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
compel/src/lib/infect.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c
index 7e1da8f..2ffd2de 100644
--- a/compel/src/lib/infect.c
+++ b/compel/src/lib/infect.c
@@ -850,9 +850,9 @@ int compel_map_exchange(struct parasite_ctl *ctl, unsigned long size)
return ret;
}
-static inline unsigned long total_pie_size(size_t blob_size, size_t nr_gp)
+static inline unsigned long total_pie_size(size_t blob_size)
{
- return round_up(blob_size + nr_gp * sizeof(long), page_size());
+ return round_up(blob_size, page_size());
}
int compel_infect(struct parasite_ctl *ctl, unsigned long nr_threads, unsigned long args_size)
@@ -876,7 +876,7 @@ int compel_infect(struct parasite_ctl *ctl, unsigned long nr_threads, unsigned l
* without using ptrace at all.
*/
- parasite_size = total_pie_size(ctl->pblob.hdr.bsize, ctl->pblob.hdr.nr_gotpcrel);
+ parasite_size = total_pie_size(ctl->pblob.hdr.bsize);
ctl->args_size = round_up(args_size, PAGE_SIZE);
parasite_size += ctl->args_size;
--
2.10.2
More information about the CRIU
mailing list