Commit a406965e authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

infect arm & aarch64: Remove kdat

In these gents the task_size should be known.
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 721e7fa5
......@@ -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"
......
......@@ -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;
......
......@@ -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) */
......
......@@ -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);
......
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