[CRIU] [PATCH 3/4] parasite: add macro for getting arch-dependent orig_ax regisister
Alexander Kartashov
alekskartashov at parallels.com
Thu May 30 05:34:45 EDT 2013
On 05/30/2013 01:18 PM, Chanho Park wrote:
> diff --git a/parasite-syscall.c b/parasite-syscall.c
> index 61d159f..c19c5dc 100644
> --- a/parasite-syscall.c
> +++ b/parasite-syscall.c
> @@ -872,8 +872,9 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
> return -1;
> }
>
> - pr_debug("%d is going to execute the syscall %lx\n", pid, regs.orig_ax);
> - if (regs.orig_ax == __NR_rt_sigreturn) {
> + pr_debug("%d is going to execute the syscall %lx\n", pid,
> + REG_ORIG_RES(regs));
> + if (REG_ORIG_RES(regs) == __NR_rt_sigreturn) {
> pr_debug("%d was stopped\n", pid);
> break;
> }
Unfortunately, it's not going to work in this way: the system call number
is never saved in the field ARM_ORIG_r0, the field ARM_r7 should be used.
I propose to introduce the macro REG_SIGNR to get the register
storing a syscall number.
--
Sincerely yours,
Alexander Kartashov
Intern
Core team
www.parallels.com
Skype: aleksandr.kartashov
Email: alekskartashov at parallels.com
More information about the CRIU
mailing list