Re: [PATCH 2/2] x86/mmap: handle worst-case heap randomization in mmap_base

From: Saidi, Ali
Date: Sun Mar 17 2019 - 11:52:21 EST




> On Mar 13, 2019, at 11:26 AM, Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
>> On 3/12/19 10:32 AM, Ali Saidi wrote:
>> + /* Provide space for brk randomization */
>> + pad += SZ_32M;
>
> Just curious: Why is the padding in your other patch conditional on the
> 32-bit vs. 64-bit apps, but here it's always 32M?
Arm changes the amount of brk based on the process being 32 vs 64 bit. X86 doesnât appear to do this.
>
> Also, did you hit this problem in practice somehow?

Just debugging a crash when testing a version of a library I compiled.

Ali