lkml.org 
[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE
On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote:
> On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> > Matthew Wilcox <willy@infradead.org> writes:
> >> So, just like we currently say "exactly one of MAP_SHARED or MAP_PRIVATE",
> >> we could add a new paragraph saying "at most one of MAP_FIXED or
> >> MAP_REQUIRED" and "any of the following values".
> >
> > MAP_REQUIRED doesn't immediately grab me, but I don't actively dislike
> > it either :)
> >
> > What about MAP_AT_ADDR ?
> >
> > It's short, and says what it does on the tin. The first argument to mmap
> > is actually called "addr" too.
>
> "FIXED" is supposed to do this too.
>
> Pavel suggested:
>
> MAP_ADD_FIXED
>
> (which is different from "use fixed", and describes why it would fail:
> can't add since it already exists.)
>
> Perhaps "MAP_FIXED_NEW"?
>
> There has been a request to drop "FIXED" from the name, so these:
>
> MAP_FIXED_NOCLOBBER
> MAP_FIXED_NOREPLACE
> MAP_FIXED_ADD
> MAP_FIXED_NEW
>
> Could be:
>
> MAP_NOCLOBBER
> MAP_NOREPLACE
> MAP_ADD
> MAP_NEW
>
> and we still have the unloved, but acceptable:
>
> MAP_REQUIRED
>
> My vote is still for "NOREPLACE" or "NOCLOBBER" since it's very
> specific, though "NEW" is pretty clear too.

How about MAP_NOFORCE?

\
 
 \ /
  Last update: 2017-12-07 20:58    [W:0.076 / U:0.096 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site