Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH 1/2] c/r: [x86_32] sys_restore to use ptregs prototype
Date: Wed, 9 Dec 2009 10:52:47 -0600	[thread overview]
Message-ID: <20091209165247.GA20538@us.ibm.com> (raw)
In-Reply-To: <1260219307.7151.3.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

Quoting Nathan Lynch (ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org):
> 
> > > * Changes the syscall prototype and definition to accept the pt_regs
> > >   struct as an argument (into %eax register).
> > 
> > I forgot to mention that this of course breaks s390 and ppc: you
> > need to provide an arch-dependent sys_restart() similar to how it's
> > done here.
> 
> Thanks, here's the fixup for powerpc.

Does this need to be in a #ifdef CONFIG_CHECKPOINT?

Near as I can tell there is no dummy do_sys_restart() for the
CONFIG_CHECKPOINT=n case.

> >From 981dca4f3a879827d6e19a0cf32c7fd25b08a878 Mon Sep 17 00:00:00 2001
> From: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
> Date: Mon, 7 Dec 2009 14:51:13 -0600
> Subject: [PATCH] checkpoint/powerpc: fix up restart code for ptregscall semantics
> 
> Signed-off-by: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
> ---
>  arch/powerpc/kernel/process.c |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index 457c269..f9da9eb 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -30,6 +30,7 @@
>  #include <linux/init_task.h>
>  #include <linux/module.h>
>  #include <linux/kallsyms.h>
> +#include <linux/checkpoint.h>
>  #include <linux/mqueue.h>
>  #include <linux/hardirq.h>
>  #include <linux/utsname.h>
> @@ -990,6 +991,25 @@ out:
>  	return error;
>  }
> 
> +int sys_restart(unsigned long a0, unsigned long a1, unsigned long a2,
> +	       unsigned long a3, unsigned long a4, unsigned long a5,
> +	       struct pt_regs *regs)
> +{
> +	unsigned long flags;
> +	pid_t pid;
> +	int logfd;
> +	int fd;
> +
> +	CHECK_FULL_REGS(regs);
> +
> +	pid = a0;
> +	fd = a1;
> +	flags = a2;
> +	logfd = a3;
> +
> +	return do_sys_restart(pid, fd, flags, logfd);
> +}
> +
>  #ifdef CONFIG_IRQSTACKS
>  static inline int valid_irq_stack(unsigned long sp, struct task_struct *p,
>  				  unsigned long nbytes)
> -- 
> 1.6.0.6
> 
> 

  parent reply	other threads:[~2009-12-09 16:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 20:31 c/r: support for x86-64 arch Oren Laadan
     [not found] ` <1260131469-2917-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-12-06 20:31   ` [PATCH 1/2] c/r: [x86_32] sys_restore to use ptregs prototype Oren Laadan
     [not found]     ` <1260131469-2917-2-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-12-06 20:31       ` [PATCH] user-cr: eclone x86-64 wrapper Oren Laadan
     [not found]         ` <1260131469-2917-3-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-12-06 20:31           ` [PATCH 2/2] c/r: x86-64: checkpoint/restart implementation Oren Laadan
2009-12-06 20:35           ` [PATCH] user-cr: eclone x86-64 wrapper Oren Laadan
2009-12-06 22:51       ` [PATCH 1/2] c/r: [x86_32] sys_restore to use ptregs prototype Oren Laadan
     [not found]         ` <4B1C357C.2090003-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-12-07 20:55           ` Nathan Lynch
     [not found]             ` <1260219307.7151.3.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-12-09 16:52               ` Serge E. Hallyn [this message]
2009-12-09 17:02               ` Serge E. Hallyn

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=20091209165247.GA20538@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ntl-e+AXbWqSrlAAvxtiuMwx3w@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