All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH] Revert "ckpt/powerpc: handle syscall restart"
Date: Sun, 14 Mar 2010 22:51:03 -0400	[thread overview]
Message-ID: <4B9DA097.1020401@cs.columbia.edu> (raw)
In-Reply-To: <1268418393-18325-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>


All three applied, thanks !

Oren.

Nathan Lynch wrote:
> This reverts commit 64dab5da66f4fe212b43272ffa5e7a3403a64deb.
> 
> This way of handling syscall restart is incorrect -- it occurs too
> early in the restart process, and restore_retval is doing the wrong
> thing for powerpc anyway (fixed in a later patch).  While the reverted
> patch managed to address the case of system calls with restart blocks,
> other restartable system calls behave incorrectly after restart.
> ---
>  arch/powerpc/kernel/checkpoint.c |   25 -------------------------
>  1 files changed, 0 insertions(+), 25 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/checkpoint.c b/arch/powerpc/kernel/checkpoint.c
> index cd384df..2634011 100644
> --- a/arch/powerpc/kernel/checkpoint.c
> +++ b/arch/powerpc/kernel/checkpoint.c
> @@ -307,31 +307,6 @@ static int restore_gprs(const struct ckpt_hdr_cpu *cpu_hdr,
>  	regs->orig_gpr3 = cpu_hdr->orig_gpr3;
>  
>  	regs->msr = sanitize_msr(regs->msr);
> -
> -	/* The normal servicing of the freezer's fake signal is
> -	 * short-circuited by checkpoint/restart.  See
> -	 * arch/powerpc/kernel/signal.c::do_signal_pending().
> -	 */
> -	if (TRAP(regs) != 0x0C00)
> -		goto out;
> -	if (!(regs->ccr & 0x10000000))
> -		goto out;
> -
> -	switch (regs->gpr[3]) {
> -	case ERESTARTNOHAND:
> -	case ERESTARTSYS:
> -	case ERESTARTNOINTR:
> -		regs->gpr[3] = regs->orig_gpr3;
> -		break;
> -	case ERESTART_RESTARTBLOCK:
> -		regs->gpr[0] = __NR_restart_syscall;
> -		break;
> -	default:
> -		goto out;
> -	}
> -
> -	regs->nip -= 4;
> -	regs->result = 0;
>  out:
>  	return rc;
>  }

      parent reply	other threads:[~2010-03-15  2:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 18:26 [PATCH] Revert "ckpt/powerpc: handle syscall restart" Nathan Lynch
     [not found] ` <1268418393-18325-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2010-03-12 18:26   ` [PATCH] use correct ccr bit for syscall error status Nathan Lynch
     [not found]     ` <1268418393-18325-2-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2010-03-12 18:57       ` Nathan Lynch
2010-03-12 18:26   ` [PATCH] checkpoint: use syscall_get_error Nathan Lynch
     [not found]     ` <1268418393-18325-3-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2010-03-12 18:59       ` Nathan Lynch
     [not found]         ` <1268420378.3763.38.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-12 19:35           ` Serge E. Hallyn
2010-03-15  2:51   ` 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=4B9DA097.1020401@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.