[CRIU] [PATCH 7/9] vdso: Mark runtime vdso if proxy needed

Pavel Emelyanov xemul at parallels.com
Fri May 24 05:31:08 EDT 2013


On 05/24/2013 01:42 AM, Cyrill Gorcunov wrote:
> 
> In case if we need vdso proxy there is a need
> to recognize it somehow on further checkpoint
> action. But such vdso won't be recognized by
> the kernel and [vdso] mark won't appear in
> procfs output. Thus we put own mark on it.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  arch/x86/vdso-pie.c | 10 ++++++++++
>  include/vdso.h      | 32 ++++++++++++++++++++++++++++++++
>  2 files changed, 42 insertions(+)
> 


> @@ -297,5 +298,14 @@ int vdso_proxify(char *who, struct vdso_symtable *sym_rt, VmaEntry *vma, unsigne
>  		return -1;
>  	}
>  
> +	/*
> +	 * Put a special mark into runtime vdso, thus at next checkpoint
> +	 * routine we could detect this vdso and do not dump it, since
> +	 * it's auto-generated every new session if proxy required.
> +	 */
> +	m = (void *)vdso_rt_parked_at;
> +	INIT_VDSO_MARK(m);
> +	m->proxy_addr = vma->start;

Let's shrink this down to one line

  vdso_put_mark(vdso_rt_parked_at, vma->start);

> +
>  	return 0;
>  }



More information about the CRIU mailing list