2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 12:57:57 +00:00

infect arm & aarch64: Remove kdat

In these gents the task_size should be known.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Pavel Emelyanov 2016-10-30 22:56:39 +03:00 committed by Andrei Vagin
parent 721e7fa5da
commit a406965e97
4 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,6 @@
#include <compel/plugins/std/syscall-codes.h>
#include "asm/types.h"
#include "criu-log.h"
#include "kerndat.h"
#include "parasite-syscall.h"
#include "compel/include/errno.h"
#include "infect.h"

View File

@ -5,7 +5,6 @@
#include <compel/asm/processor-flags.h>
#include "asm/types.h"
#include "criu-log.h"
#include "kerndat.h"
#include "parasite-syscall.h"
#include "compel/include/errno.h"
#include "infect.h"
@ -100,7 +99,7 @@ void *remote_mmap(struct parasite_ctl *ctl,
err = compel_syscall(ctl, __NR_mmap2, &map,
(unsigned long)addr, length, prot, flags, fd, offset >> 12);
if (err < 0 || map > kdat.task_size)
if (err < 0 || map > ctl->ictx.task_size)
map = 0;
return (void *)map;

View File

@ -102,6 +102,7 @@ struct infect_ctx {
int (*make_sigframe)(void *, struct rt_sigframe *, struct rt_sigframe *, k_rtsigset_t *);
void *regs_arg;
unsigned long task_size;
unsigned long syscall_ip; /* entry point of infection */
unsigned long flags; /* fine-tune (e.g. faults) */

View File

@ -549,6 +549,7 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, struct pstree_item *item,
ictx->save_regs = save_task_regs;
ictx->make_sigframe = make_sigframe;
ictx->regs_arg = item->core[0];
ictx->task_size = kdat.task_size;
ictx->syscall_ip = p;
pr_debug("Parasite syscall_ip at %#lx\n", p);