Subject: Re: [PATCH V2 02/11] powerpc/mm/slice: when computing slice mask limit lowe slice max addr correctly

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Fri, 17 Mar 2017 12:25:37 +0530

Paul Mackerras <[email-masked]> writes:

> On Thu, Mar 16, 2017 at 04:02:00PM +0530, Aneesh Kumar K.V wrote:
>> For low slice max addr should be less that 4G
>                                         ^^^^ than
>
> A more verbose explanation of the off-by-1 error that you are fixing
> is needed here.  Tell us what goes wrong with the current code and why
> your fix is the correct one.

How about

powerpc/mm/slice: when computing slice mask limit low slice max addr correctly

For low slice, max addr should be less that 4G. Without limiting this correctly
we will end up with a low slice mask which has 17th bit set. This is not
a problem with the current code because our low slice mask is of type u16. But
in later patch I am switching low slice mask to u64 type and having the 17bit
set result in wrong slice mask which in turn results in mmap failures.

>
>> 
>> Signed-off-by: Aneesh Kumar K.V <[email-masked]>
>
> For the code change:
>
> Reviewed-by: Paul Mackerras <[email-masked]>