Subject: [PATCH v2 2/2] ARM: topdown mmap support

From: [email-masked] (Rob Herring)
Date: Wed, 24 Oct 2012 07:39:53 -0500

On 10/24/2012 07:22 AM, zhangfei gao wrote:
> On Fri, Nov 18, 2011 at 5:47 AM, Rob Herring <[email-masked]> wrote:
>> From: Rob Herring <[email-masked]>
>>
>> Similar to other architectures, this adds topdown mmap support in user
>> process address space allocation policy. This allows mmap sizes greater
>> than 2GB. This support is largely copied from MIPS and the generic
>> implementations.
>>
>> The address space randomization is moved into arch_pick_mmap_layout.
>>
>> Tested on V-Express with ubuntu and a mmap test from here:
>> https://bugs.launchpad.net/bugs/861296
>>
>> Signed-off-by: Rob Herring <[email-masked]>
>> Acked-by: Nicolas Pitre <[email-masked]>
> 
> Unfortunately, we met "no vspace available" during loading libmono.so,
> when using default arch_get_unmapped_area_topdown method, tested on
> Jelly Bean with 3.4 kernel.
> While no problem using arch_get_unmapped_area in the patch, or just
> revert this patch.
> The result is some application can not run.
> 
> Just google, find same issue reported on Jelly Bean with 3.4 kernel.
> 
> Any suggestion?

Perhaps Android has hardcoded expectations about the virtual memory
layout? I was worried about that at the time and asked the Linaro
Android folks to test it.

I believe either layout can be selected at runtime per process. I don't
recall the exact /proc file to control this.

Rob