[Devel] Re: Linux Checkpoint-Restart - v19

Serge E. Hallyn serue at us.ibm.com
Tue Apr 6 15:23:45 PDT 2010


Quoting Nathan Lynch (ntl at pobox.com):
> Hello-
> 
> On Tue, 2010-04-06 at 11:54 +0900, Jiro SEKIBA wrote:
> > I tried checkpointing/restarting with this binary, but still get SEGV at the same point, 
> > still get same gdb warning(Cannot find thread-local variables on this target)
> 
> I believe I have been experiencing a similar problem:
> 
> https://lists.linux-foundation.org/pipermail/containers/2010-April/024105.html
> 
> I may have found a fix.  Can you please test whether this kernel patch
> makes the SEGVs after restart go away?

Acked-by: Serge Hallyn <serue at us.ibm.com>
Tested-by: Serge Hallyn <serue at us.ibm.com>

Thanks, Nathan.  So I could confirm that:

1. my regular ckpt-v20 worked fine.
2. setting CONFIG_CC_STACKPROTECTOR=y made cr_tests/sleeptest fail
   while cr_tests/simple succeeded
3. applying this patch lets sleeptest succeed.

Thanks!

-serge

> 
> 
>  arch/x86/kernel/checkpoint_32.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/checkpoint_32.c b/arch/x86/kernel/checkpoint_32.c
> index 32cde34..d80c168 100644
> --- a/arch/x86/kernel/checkpoint_32.c
> +++ b/arch/x86/kernel/checkpoint_32.c
> @@ -86,7 +86,6 @@ static unsigned short decode_segment(__u16 seg)
> 
>  void save_cpu_regs(struct ckpt_hdr_cpu *h, struct task_struct *t)
>  {
> -	struct thread_struct *thread = &t->thread;
>  	struct pt_regs *regs = task_pt_regs(t);
>  	unsigned long _gs;
> 
> @@ -116,7 +115,7 @@ void save_cpu_regs(struct ckpt_hdr_cpu *h, struct task_struct *t)
>  	if (t == current)
>  		_gs = get_user_gs(regs);
>  	else
> -		_gs = thread->gs;
> +		_gs = task_user_gs(t);
> 
>  	h->fsindex = encode_segment(regs->fs);
>  	h->gsindex = encode_segment(_gs);
> 
> 
> _______________________________________________
> Containers mailing list
> Containers at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list