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

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Fri Mar 17 17:55:37 AEDT 2017


Paul Mackerras <paulus at ozlabs.org> 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 <aneesh.kumar at linux.vnet.ibm.com>
>
> For the code change:
>
> Reviewed-by: Paul Mackerras <paulus at ozlabs.org>



More information about the Linuxppc-dev mailing list