[CRIU] [PATCHv2 07/17] parasite-vdso: add casts from uint64_t
Dmitry Safonov
dsafonov at virtuozzo.com
Tue Apr 12 09:16:16 PDT 2016
On 04/12/2016 07:10 PM, Dmitry Safonov wrote:
> As for compatible 32-bit pie size of uint64_t is bigger than size of
> unsigned long type, add proper casts, so we could build compatible pie.
>
> Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
Oh, I missed
Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>
Seems like, didn't close vim on this patch before sending.
> ---
> criu/pie/parasite-vdso.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/criu/pie/parasite-vdso.c b/criu/pie/parasite-vdso.c
> index c8cb34f8708c..7f4e6a022594 100644
> --- a/criu/pie/parasite-vdso.c
> +++ b/criu/pie/parasite-vdso.c
> @@ -142,9 +142,9 @@ int vdso_proxify(char *who, struct vdso_symtable *sym_rt,
> }
>
> pr_debug("image [vdso] %lx-%lx [vvar] %lx-%lx\n",
> - vma_vdso->start, vma_vdso->end,
> - vma_vvar ? vma_vvar->start : VVAR_BAD_ADDR,
> - vma_vvar ? vma_vvar->end : VVAR_BAD_ADDR);
> + (unsigned long)vma_vdso->start, (unsigned long)vma_vdso->end,
> + vma_vvar ? (unsigned long)vma_vvar->start : VVAR_BAD_ADDR,
> + vma_vvar ? (unsigned long)vma_vvar->end : VVAR_BAD_ADDR);
>
> /*
> * Easy case -- the vdso from image has same offsets, order and size
> @@ -160,13 +160,15 @@ int vdso_proxify(char *who, struct vdso_symtable *sym_rt,
>
> pr_info("Runtime vdso/vvar matches dumpee, remap inplace\n");
>
> - if (sys_munmap((void *)vma_vdso->start, vma_entry_len(vma_vdso))) {
> + if (sys_munmap((void *)(uintptr_t)vma_vdso->start,
> + vma_entry_len(vma_vdso))) {
> pr_err("Failed to unmap %s\n", who);
> return -1;
> }
>
> if (vma_vvar) {
> - if (sys_munmap((void *)vma_vvar->start, vma_entry_len(vma_vvar))) {
> + if (sys_munmap((void *)(uintptr_t)vma_vvar->start,
> + vma_entry_len(vma_vvar))) {
> pr_err("Failed to unmap %s\n", who);
> return -1;
> }
--
Regards,
Dmitry Safonov
More information about the CRIU
mailing list