[CRIU] [PATCH 4/4] arch: x86 -- Add proxification of vDSO calls
Pavel Emelyanov
xemul at parallels.com
Wed Apr 17 09:06:13 EDT 2013
> @@ -381,6 +392,30 @@ static int restore_priv_vma_content(pid_t pid)
> }
> }
>
> + /*
> + * Proxify vdso content.
> + */
> + if (vdso_proxy->proxify) {
> + void *base_to, *base_from;
> +
> + base_to = decode_pointer(vma_premmaped_start(&vdso_proxy->vma_to->vma));
> + base_from = decode_pointer(vma_premmaped_start(&vdso_proxy->sym_from->vma));
> +
> + /*
> + * Fill new vDSO with content of run-time vDSO
> + */
> + pr_debug("vdso: Copy run-time contents %p -> %p\n",
> + (void *)vdso_proxy->sym_rt.vma_start, base_to);
> +
> + memcpy(base_to, (void *)vdso_proxy->sym_rt.vma_start,
> + symtable_vma_size(&vdso_proxy->sym_rt));
> +
> + if (arch_proxify_vdso(base_to, base_from,
> + &vdso_proxy->sym_rt,
> + &vdso_proxy->sym_dumpee))
> + return -1;
I don't get this. You put into task's VDSO address a VDSO-proxy with the memcpy above
and tune jump offsets with arch_proxify_vdso. Where is the new VDSO itself?
> + }
> +
More information about the CRIU
mailing list