Thread (12 messages) 12 messages, 3 authors, 2018-10-18

[PATCH V2 1/4] mm: mmap: Allow for "high" userspace addresses

From: Steve Capper <hidden>
Date: 2018-10-18 10:35:43
Also in: linux-mm

On Wed, Oct 17, 2018 at 09:48:15AM -0700, Matthew Wilcox wrote:
On Wed, Oct 17, 2018 at 05:34:56PM +0100, Steve Capper wrote:
quoted
This patch adds support for "high" userspace addresses that are
optionally supported on the system and have to be requested via a hint
mechanism ("high" addr parameter to mmap).

Rather than duplicate the arch_get_unmapped_* stock implementations,
this patch instead introduces two architectural helper macros and
applies them to arch_get_unmapped_*:
 arch_get_mmap_end(addr) - get mmap upper limit depending on addr hint
 arch_get_mmap_base(addr, base) - get mmap_base depending on addr hint

If these macros are not defined in architectural code then they default
to (TASK_SIZE) and (base) so should not introduce any behavioural
changes to architectures that do not define them.
Can you explain (in the changelog) why we need to do this for arm64
when it wasn't needed for the equivalent feature on x86-64?  I think the
answer is that x86-64 already has its own arch_get_unmapped* functions and
rather than duplicating arch_get_unmapped* for arm64, you want to continue
using the generic ones with just this minor hooking.  But I'd like that
spelled out explicitly for the next person who comes along and wonders.
Thanks Matthew,
Yes we thought it better to make an unobtrusive change to the generic
code rather than copy it over to arm64 (whilst x86 already had an
architecture specific version that was patched).

I will make the commit log a lot clearer.

Cheers,
-- 
Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help