[PATCH] Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT
Carlos O'Donell
carlos@redhat.com
Wed Dec 16 14:04:00 GMT 2015
On 12/16/2015 09:02 AM, Michael Kerrisk (man-pages) wrote:
> (Thanks, Carlos.)
>
>> Here is a patch for Linux man page.
>
> Thanks, H.J. I applied the patch and tweaked your text somewhat.
> Does the following look okay?
>
> LD_PREFER_MAP_32BIT_EXEC
> (x86-64 only)(glibc since 2.23) According to the Intel
> Silvermont software optimization guide, for 64-bit appliâ
> cations, branch prediction performance can be negatively
> impacted when the target of a branch is more than 4GB away
> from the branch. If this environment variable is set (to
> any value), ld.so will first try to map executable pages
> using the mmap(2) MAP_32BIT flag, and fall back to mapping
> without that flag if that attempt fails. NB: MAP_32BIT
> will map to the low 2GB (not 2GB) of the address space.
> Because MAP_32BIT reduces the address range available for
> address space layout randomization (ASLR), LD_PREâ
> FER_MAP_32BIT_EXEC is always disabled in secure-execution
> mode.
Looks great. Thanks for the quick turnaround Michael!
Cheers,
Carlos.
More information about the Libc-alpha
mailing list