[CRIU] [PATCH 4/9] vdso: Remap runtime vdso copy to safe place

Pavel Emelyanov xemul at parallels.com
Fri May 24 05:29:41 EDT 2013


On 05/24/2013 01:42 AM, Cyrill Gorcunov wrote:
> 
> Runtime vdso need to be kept in some safe place when all
> self-vmas are unmapped. So we reserve space for it in restorer
> blob area and then remap it into. It's quite important to do
> a remap here rather than data copy because otherwise pfn
> of vdso disappear and in future we won't be able to detect
> vdso are on dumping stage.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  arch/arm/include/asm/vdso.h |  1 +
>  arch/arm/vdso-pie.c         |  5 +++++
>  arch/x86/include/asm/vdso.h |  1 +
>  arch/x86/vdso-pie.c         | 16 ++++++++++++++++
>  cr-restore.c                | 30 +++++++++++++++++++++++++++---
>  include/restorer.h          |  5 +++++
>  pie/restorer.c              | 18 ++++++++++++++++++
>  7 files changed, 73 insertions(+), 3 deletions(-)
> 
> +			if (vdso_remap("rt-vdso", vma_entry->start,
> +				       args->vdso_rt_parked_at,
> +				       vdso_vma_size(&args->vdso_sym_rt)))

Since you want to use helper, let's benefit from that and
make it look like

  vdso_remap("rt-vdso", vma_entry, args)

so that it decided where from and where to to remap it.



More information about the CRIU mailing list