Re: [PATCH] MM: Support more pagesizes for MAP_HUGETLB/SHM_HUGETLB v6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Not sure of your notation there. I assume 31..27 means 5 bits (32
> through to 28 inclusive, 27 excluded). That gives you just 2^31 ==

[27...31]

You're right it's only 5 bits, so just 2GB.

Thinking about it more PowerPC has a 16GB page, so we probably
need to move this to prot.

However I'm not sure if any architectures use let's say the high  
8 bits of prot.

> 
> But there seems an obvious solution here: given your value in those
> bits (call it 'n'), the why not apply a multiplier. I mean, certainly
> you never want a value <= 12 for n, and I suspect that the reasonable
> minimum could be much larger (e.g., 2^16). Call that minimum M. Then
> you could interpret the value in your bits as meaning a page size of
> 
>     (2^n) * M

I considered that, but it would seem ugly and does not add that 
many bits.

> 
> > So this will use up all remaining flag bits now.
> 
> On the other hand, that seems really bad. It looks like that kills the
> ability to further extend the mmap() API with new flags in the future.
> It doesn't sound like we should be doing that.

You can always add flags to PROT or add a mmap3(). Has been done before.
Or just don't do any new MAP_SECURITY_HOLEs

-Andi

-- 
ak@xxxxxxxxxxxxxxx -- Speaking for myself only

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]