[CRIU] [PATCH 4/8] x86: Add 32bit variant of TASK_SIZE
Cyrill Gorcunov
gorcunov at gmail.com
Fri May 15 05:51:58 PDT 2015
On Fri, May 15, 2015 at 08:43:15AM -0400, Christopher Covington wrote:
> >
> > This is true for any TASK_SIZE value, even if you say to be
> > \infty the kernel would (should) never report addresses higher
> > than some value. Why do we need it at all?
>
> I haven't come up with good patches yet, but defining TASK_SIZE is
> particularly annoying on AArch64, as there are several options. There is one
> value for 32-bit processes and currently three possible values for 64-bit,
> depending on how many virtual address bits are supported (current choices are
> 39 or 48 for 4K pages and 42 or 48 for 64K pages).
>
> http://lxr.free-electrons.com/source/arch/arm64/include/asm/memory.h#L61
> http://lxr.free-electrons.com/source/arch/arm64/Kconfig#L388
>
> My current thought is to add an (AArch64-specific) ELF auxiliary vector for
> the task size, analogous to how page size is communicated.
>
> Alternatively, it could be probed, but I'm not currently a fan of that approach.
>
> My recollection of debugging CRIU is that TASK_SIZE is principally used during
> restore for determining where it is possible to temporarily store values when
> the contents of two memory regions needs to be swapped.
Yes, task-size actually is kernel specific data and probably we should rename
it to something more suitable and not hardcode but init during criu startup
depending on the architecrure criu is working on.
More information about the CRIU
mailing list