[CRIU] [PATCH 1/2] cr-restore.c: fixed compilation errors on ARM

Pavel Emelyanov xemul at parallels.com
Mon Mar 18 14:31:01 EDT 2013


On 03/18/2013 10:48 AM, Alexander Kartashov wrote:
> Use decode_pointer() to convert a virtual address into a native pointer.
> 
> Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
> ---
>  cr-restore.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index 6c0b5ae..b17524a 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -317,7 +317,7 @@ static int restore_priv_vma_content(pid_t pid)
>  				return -1;
>  			}
>  
> -			p = (void *)((off) * PAGE_SIZE +
> +			p = decode_pointer((off) * PAGE_SIZE +
>  					vma_premmaped_start(&vma->vma));

This looks bogus. decode_pointer should convert u64 into void *, not
unsigned long to void *.

>  
>  			if (memcmp(p, buf, PAGE_SIZE) == 0) {
> 




More information about the CRIU mailing list