Subject: Re: [PATCH v2 3/5] powerpc/64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Mon, 13 Nov 2017 10:29:49 +0530

Nicholas Piggin <[email-masked]> writes:

> While mapping hints with a length that cross 128TB are disallowed,
> MAP_FIXED allocations that cross 128TB are allowed. These are failing
> on hash (on radix they succeed). Add an additional case for fixed
> mappings to expand the addr_limit when crossing 128TB.
>

Reviewed-by: Aneesh Kumar K.V <[email-masked]>

> Cc: "Aneesh Kumar K.V" <[email-masked]>
> Fixes: f4ea6dcb08 ("powerpc/mm: Enable mappings above 128TB")
> Signed-off-by: Nicholas Piggin <[email-masked]>
> ---
>  arch/powerpc/mm/slice.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
> index 3889201b560c..a4f93699194b 100644
> --- a/arch/powerpc/mm/slice.c
> +++ b/arch/powerpc/mm/slice.c
> @@ -418,7 +418,7 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
>  	unsigned long high_limit;
>
>  	high_limit = DEFAULT_MAP_WINDOW;
> -	if (addr >= high_limit)
> +	if (addr >= high_limit || (fixed && (addr + len > high_limit)))
>  		high_limit = TASK_SIZE;
>
>  	if (len > high_limit)
> -- 
> 2.15.0