[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b0bd6862e3a47728c8f658c8a6b3dea@AcuMS.aculab.com>
Date: Fri, 8 Dec 2017 14:33:35 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Michael Ellerman' <mpe@...erman.id.au>,
Matthew Wilcox <willy@...radead.org>,
Kees Cook <keescook@...omium.org>
CC: Cyril Hrubis <chrubis@...e.cz>, Michal Hocko <mhocko@...nel.org>,
"Linux API" <linux-api@...r.kernel.org>,
Khalid Aziz <khalid.aziz@...cle.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
Russell King - ARM Linux <linux@...linux.org.uk>,
Andrea Arcangeli <aarcange@...hat.com>,
Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>,
Florian Weimer <fweimer@...hat.com>,
"John Hubbard" <jhubbard@...dia.com>,
Abdul Haleem <abdhalee@...ux.vnet.ibm.com>,
Joel Stanley <joel@....id.au>, Pavel Machek <pavel@....cz>
Subject: RE: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE
From: Michael Ellerman
> Sent: 08 December 2017 11:08
...
> If we had a time machine, the right set of flags would be:
>
> - MAP_FIXED: don't treat addr as a hint, fail if addr is not free
> - MAP_REPLACE: replace an existing mapping (or force or clobber)
>
> But the two were conflated for some reason in the current MAP_FIXED.
Possibly because the original use was loading overlays?
> Given we can't go back and fix it, the closest we can get is to add a
> variant of MAP_FIXED which subtracts the "REPLACE" semantic.
>
> ie: MAP_FIXED_NOREPLACE
Much better than _SAFE - which is always bad because it is usually
one 'safe' for one specific use case.
David
Powered by blists - more mailing lists