lkml.org 
[lkml]   [2017]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 0/2] mm: introduce MAP_FIXED_SAFE
On Thu 14-12-17 12:44:17, Edward Napierala wrote:
> Regarding the name - how about adopting MAP_EXCL? It was introduced in
> FreeBSD,
> and seems to do exactly this; quoting mmap(2):
>
> MAP_FIXED Do not permit the system to select a different address
> than the one specified. If the specified address
> cannot be used, mmap() will fail. If MAP_FIXED is
> specified, addr must be a multiple of the page size.
> If MAP_EXCL is not specified, a successful MAP_FIXED
> request replaces any previous mappings for the
> process' pages in the range from addr to addr + len.
> In contrast, if MAP_EXCL is specified, the request
> will fail if a mapping already exists within the
> range.

I am not familiar with the FreeBSD implementation but from the above it
looks like MAP_EXCL is a MAP_FIXED mofifier which is not how we are
going to implement it in linux due to reasons mentioned in this cover
letter. Using the same name would be more confusing than helpful I am
afraid.

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-12-14 14:16    [W:0.833 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site