[CRIU] [PATCH] x86: sigframe -- Don't forget to copy ss

Andrey Vagin avagin at openvz.org
Wed Jul 29 21:23:55 PDT 2015


2015-07-30 1:10 GMT+03:00 Cyrill Gorcunov <gorcunov at openvz.org>:
> Make sure we don't pass any trash value here, because
> the kernel does copy it explicitly. We allocate the
> memory for frame as zero filled but stack segment
> is special and zero is not acceptable (we've had
> a discussion on LKML if we need a special handling
> for zero ss but end up that new kernels need new CRIU
> version, upon which all agreed). Finally in
> commit 296bbf7e3 I managed to hit exactly
> this problem :)
>

Acked-by: Andrey Wagin <avagin at gmail.com>

> Reported-by: Andrey Wagin <avagin at gmail.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  arch/x86/crtools.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/arch/x86/crtools.c b/arch/x86/crtools.c
> index caef8514558f..48890133a4ff 100644
> --- a/arch/x86/crtools.c
> +++ b/arch/x86/crtools.c
> @@ -486,10 +486,7 @@ int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r)
>         CPREG2(eflags, flags);
>
>         CPREG1(cs);
> -
> -#ifdef CONFIG_X86_32
>         CPREG1(ss);
> -#endif
>
>  #ifdef CONFIG_X86_32
>         CPREG1(gs);
> --
> 2.4.3
>


More information about the CRIU mailing list