[CRIU] [PATCH 1/6] headers: Move task_size helper into common/page.h

Pavel Emelyanov xemul at virtuozzo.com
Fri Nov 18 03:09:31 PST 2016


> diff --git a/include/common/arch/x86/asm/page.h b/include/common/arch/x86/asm/page.h
> index 134835556c62..83fb4e75c59c 100644
> --- a/include/common/arch/x86/asm/page.h
> +++ b/include/common/arch/x86/asm/page.h
> @@ -16,4 +16,16 @@
>  #define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
>  #define page_size()	PAGE_SIZE
>  
> +#ifdef CONFIG_X86_64
> +# define TASK_SIZE	((1UL << 47) - PAGE_SIZE)
> +#else
> +/*
> + * Task size may be limited to 3G but we need a
> + * higher limit, because it's backward compatible.
> + */
> +# define TASK_SIZE	(0xffffe000)
> +#endif
> +
> +static inline unsigned long task_size(void) { return TASK_SIZE; }
> +
>  #endif /* __CR_ASM_PAGE_H__ */
> 

The task_size() is used by ... criu only. Why not leave it in criu sources?

-- Pavel


More information about the CRIU mailing list