[CRIU] [PATCH 12/23] cr-restore.c: use TASK_SIZE instead of TASK_SIZE_MAX
Andrey Vagin
avagin at parallels.com
Mon Jan 14 05:32:40 EST 2013
On Mon, Jan 14, 2013 at 02:05:00PM +0400, Pavel Emelyanov wrote:
> On 01/14/2013 11:25 AM, Alexander Kartashov wrote:
>
> It was done deliberately. Andrey, help us, what do we need this
> off-one-page here?
I took this from the kernel source:
arch/x86/include/asm/processor.h
/*
* User space process size. 47bits minus one guard page.
*/
#define TASK_SIZE_MAX ((1UL << 47) - PAGE_SIZE)
>
> >
> > Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
> > ---
> > cr-restore.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/cr-restore.c b/cr-restore.c
> > index 172b61b..7bdbc3a 100644
> > --- a/cr-restore.c
> > +++ b/cr-restore.c
> > @@ -1260,7 +1260,6 @@ int cr_restore_tasks(pid_t pid, struct cr_options *opts)
> > return restore_root_task(root_item, opts);
> > }
> >
> > -#define TASK_SIZE_MAX ((1UL << 47) - PAGE_SIZE)
> > static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list,
> > struct list_head *self_vma_list, long vma_len)
> > {
> > @@ -1268,7 +1267,7 @@ static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list,
> > long prev_vma_end = 0;
> > struct vma_area end_vma;
> >
> > - end_vma.vma.start = end_vma.vma.end = TASK_SIZE_MAX;
> > + end_vma.vma.start = end_vma.vma.end = TASK_SIZE;
> > prev_vma_end = PAGE_SIZE * 0x10; /* CONFIG_LSM_MMAP_MIN_ADDR=65536 */
> >
> > s_vma = list_first_entry(self_vma_list, struct vma_area, list);
> >
>
>
More information about the CRIU
mailing list