Linux Container Development
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: [PATCH 1/1] add 32-bit checkpoint wrapper
Date: Wed, 20 Jan 2010 15:36:46 -0500	[thread overview]
Message-ID: <4B57695E.3090203@cs.columbia.edu> (raw)
In-Reply-To: <20100118232245.GA31116-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>


This one too.

Serge E. Hallyn wrote:
> and get logfd from the right register (di is 5th arg)
> 
> With this patch on top of Oren's dec 6 patches, and my own patch from
> earlier today, cr_tests pass on x86-32.
> 
> I will probably push these to cr-next tomorrow along with the needed
> accompanying s390 and powerpc (from Nathan) changes.
> 
> Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
>  arch/x86/kernel/checkpoint_32.c |   20 +++++++++++++++++++-
>  1 files changed, 19 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/checkpoint_32.c b/arch/x86/kernel/checkpoint_32.c
> index d5ea6a0..3ce9a81 100644
> --- a/arch/x86/kernel/checkpoint_32.c
> +++ b/arch/x86/kernel/checkpoint_32.c
> @@ -19,6 +19,24 @@
>  #include <linux/checkpoint_hdr.h>
>  
>  /*
> + * sys_checkpoint needs to be a ptregscall if sys_restart is
> + * one so self-checkpoint images can be restarted.
> + */
> +long sys_checkpoint(struct pt_regs *regs)
> +{
> +	unsigned long flags;
> +	int fd, logfd;
> +	pid_t pid;
> +
> +	pid = regs->bx;
> +	fd = regs->cx;
> +	flags = regs->dx;
> +	logfd = regs->si;
> +
> +	return do_sys_checkpoint(pid, fd, flags, logfd);
> +}
> +
> +/*
>   * sys_restart needs to access and modify the pt_regs structure to
>   * restore the original state from the time of the checkpoint.
>   */
> @@ -31,7 +49,7 @@ long sys_restart(struct pt_regs *regs)
>  	pid = regs->bx;
>  	fd = regs->cx;
>  	flags = regs->dx;
> -	logfd = regs->di;
> +	logfd = regs->si;
>  
>  	return do_sys_restart(pid, fd, flags, logfd);
>  }

      parent reply	other threads:[~2010-01-20 20:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 23:22 [PATCH 1/1] add 32-bit checkpoint wrapper Serge E. Hallyn
     [not found] ` <20100118232245.GA31116-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-20 20:36   ` Oren Laadan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B57695E.3090203@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox