[PATCH V3 07/17] riscv: compat: Re-implement TASK_SIZE for COMPAT_32BIT

Arnd Bergmann arnd at arndb.de
Thu Jan 20 20:31:09 AEDT 2022


On Thu, Jan 20, 2022 at 8:39 AM <guoren at kernel.org> wrote:
>
> From: Guo Ren <guoren at linux.alibaba.com>
>
> Make TASK_SIZE from const to dynamic detect TIF_32BIT flag
> function. Refer to arm64 to implement DEFAULT_MAP_WINDOW_64 for
> efi-stub.
>
> Limit 32-bit compatible process in 0-2GB virtual address range
> (which is enough for real scenarios), because it could avoid
> address sign extend problem when 32-bit enter 64-bit and ease
> software design.
>
> The standard 32-bit TASK_SIZE is 0x9dc00000:FIXADDR_START, and
> compared to a compatible 32-bit, it increases 476MB for the
> application's virtual address.
>
> Signed-off-by: Guo Ren <guoren at linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren at kernel.org>
> Cc: Arnd Bergmann <arnd at arndb.de>

Reviewed-by: Arnd Bergmann <arnd at arndb.de>


More information about the Linuxppc-dev mailing list