[CRIU] [PATCH 4/8] x86: Add 32bit variant of TASK_SIZE

Cyrill Gorcunov gorcunov at gmail.com
Fri May 15 05:33:02 PDT 2015


On Fri, May 15, 2015 at 03:28:13PM +0300, Pavel Emelyanov wrote:
> On 05/15/2015 03:01 PM, Cyrill Gorcunov wrote:
> > On Fri, May 15, 2015 at 02:36:13PM +0300, Pavel Emelyanov wrote:
> >>>
> >>> There are two limits for user space, depending on kernel
> >>> configuration: 0xc0000000 or 0xffffe000. 
> >>
> >> O_o  Really??? Which config option controls this? I remember
> >> the so called 4g-split patches, which extended the userspace
> >> memory up to amost 4G, but AFAIK they never found their way
> >> into the mainstream kernel.
> > 
> > ARCH="i386" make nconfig
> > 
> > Processor type and features -->
> >   Memory split (3G/1G user/kernel split) -->
> > 
> > which modifies CONFIG_PAGE_OFFSET --> __PAGE_OFFSET -> PAGE_OFFSET -> TASK_SIZE
> 
> For i386
> 
>         default 0xB0000000 if VMSPLIT_3G_OPT
>         default 0x80000000 if VMSPLIT_2G
>         default 0x78000000 if VMSPLIT_2G_OPT
>         default 0x40000000 if VMSPLIT_1G
>         default 0xC0000000
> 
> the 0xffffe000 is only available for 32-bit tasks on x64 without
> ADDR_LIMIT_3GB in personality
> 
> #define IA32_PAGE_OFFSET        ((current->personality & ADDR_LIMIT_3GB) ? \
>                                         0xc0000000 : 0xFFFFe000)
> 
> #define TASK_SIZE               (test_thread_flag(TIF_ADDR32) ? \
>                                         IA32_PAGE_OFFSET : TASK_SIZE_MAX)

Yes, thanks. Running 32bit tasks on x86-64 node gives the second
limit by default as far as I know. So the limit 0xFFFFe000 should
fit us (but comment is slightly incorrect indeed).


More information about the CRIU mailing list