diff --git a/compel/arch/aarch64/src/lib/infect.c b/compel/arch/aarch64/src/lib/infect.c index 74e72ad39..c4a2fde20 100644 --- a/compel/arch/aarch64/src/lib/infect.c +++ b/compel/arch/aarch64/src/lib/infect.c @@ -57,7 +57,8 @@ int sigreturn_prep_fpu_frame_plain(struct rt_sigframe *sigframe, return 0; } -int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, void *arg) +int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, + void *arg, __maybe_unused unsigned long flags) { struct iovec iov; user_fpregs_struct_t fpsimd; diff --git a/compel/arch/arm/src/lib/infect.c b/compel/arch/arm/src/lib/infect.c index c574d00e1..c17cb9c9b 100644 --- a/compel/arch/arm/src/lib/infect.c +++ b/compel/arch/arm/src/lib/infect.c @@ -66,7 +66,8 @@ int sigreturn_prep_fpu_frame_plain(struct rt_sigframe *sigframe, } #define PTRACE_GETVFPREGS 27 -int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, void *arg) +int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, + void *arg, __maybe_unused unsigned long flags) { user_fpregs_struct_t vfp; int ret = -1; diff --git a/compel/arch/ppc64/src/lib/infect.c b/compel/arch/ppc64/src/lib/infect.c index 1fa333e00..96e1f3ba6 100644 --- a/compel/arch/ppc64/src/lib/infect.c +++ b/compel/arch/ppc64/src/lib/infect.c @@ -371,7 +371,8 @@ static int __get_task_regs(pid_t pid, user_regs_struct_t *regs, return 0; } -int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, void *arg) +int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, + void *arg, __maybe_unused unsigned long flags) { user_fpregs_struct_t fpregs; int ret; diff --git a/compel/arch/s390/src/lib/infect.c b/compel/arch/s390/src/lib/infect.c index abc1e6cd3..940d04418 100644 --- a/compel/arch/s390/src/lib/infect.c +++ b/compel/arch/s390/src/lib/infect.c @@ -312,7 +312,7 @@ static int s390_disable_ri_bit(pid_t pid, user_regs_struct_t *regs) * Prepare task registers for restart */ int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, - void *arg) + void *arg, __maybe_unused unsigned long flags) { user_fpregs_struct_t fpregs; struct iovec iov; diff --git a/compel/arch/x86/src/lib/infect.c b/compel/arch/x86/src/lib/infect.c index e546ee376..cdf468339 100644 --- a/compel/arch/x86/src/lib/infect.c +++ b/compel/arch/x86/src/lib/infect.c @@ -225,7 +225,8 @@ int sigreturn_prep_fpu_frame_plain(struct rt_sigframe *sigframe, ((user_regs_native(pregs)) ? (int64_t)((pregs)->native.name) : \ (int32_t)((pregs)->compat.name)) -int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, void *arg) +int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, + void *arg, __maybe_unused unsigned long flags) { user_fpregs_struct_t xsave = { }, *xs = NULL; diff --git a/compel/include/infect-priv.h b/compel/include/infect-priv.h index 00671e71f..ec6dd455d 100644 --- a/compel/include/infect-priv.h +++ b/compel/include/infect-priv.h @@ -58,7 +58,8 @@ extern void *remote_mmap(struct parasite_ctl *ctl, void *addr, size_t length, int prot, int flags, int fd, off_t offset); extern bool arch_can_dump_task(struct parasite_ctl *ctl); -extern int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, void *arg); +extern int get_task_regs(pid_t pid, user_regs_struct_t *regs, save_regs_t save, + void *arg, unsigned long flags); extern int arch_fetch_sas(struct parasite_ctl *ctl, struct rt_sigframe *s); extern int sigreturn_prep_regs_plain(struct rt_sigframe *sigframe, user_regs_struct_t *regs, diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c index 0527481ed..ecc6599b1 100644 --- a/compel/src/lib/infect.c +++ b/compel/src/lib/infect.c @@ -667,7 +667,8 @@ static int parasite_start_daemon(struct parasite_ctl *ctl) * while in daemon it is not such. */ - if (get_task_regs(pid, &ctl->orig.regs, ictx->save_regs, ictx->regs_arg)) { + if (get_task_regs(pid, &ctl->orig.regs, ictx->save_regs, + ictx->regs_arg, ictx->flags)) { pr_err("Can't obtain regs for thread %d\n", pid); return -1; } @@ -1569,7 +1570,7 @@ k_rtsigset_t *compel_task_sigmask(struct parasite_ctl *ctl) int compel_get_thread_regs(struct parasite_thread_ctl *tctl, save_regs_t save, void * arg) { - return get_task_regs(tctl->tid, &tctl->th.regs, save, arg); + return get_task_regs(tctl->tid, &tctl->th.regs, save, arg, tctl->ctl->ictx.flags); } struct infect_ctx *compel_infect_ctx(struct parasite_ctl *ctl)