Thread (22 messages) 22 messages, 7 authors, 2017-09-18

Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding new mmap flags

From: Dan Williams <hidden>
Date: 2017-08-15 22:31:04
Also in: linux-fsdevel, linux-mm, linux-xfs, lkml, nvdimm

On Tue, Aug 15, 2017 at 9:28 AM, Andy Lutomirski [off-list ref] wrote:
On Mon, Aug 14, 2017 at 11:12 PM, Dan Williams [off-list ref] wrote:
quoted
The mmap syscall suffers from the ABI anti-pattern of not validating
unknown flags. However, proposals like MAP_SYNC and MAP_DIRECT need a
mechanism to define new behavior that is known to fail on older kernels
without the feature. Use the fact that specifying MAP_SHARED and
MAP_PRIVATE at the same time is invalid as a cute hack to allow a new
set of validated flags to be introduced.
While this is cute, is it actually better than a new syscall?
After playing with MAP_DIRECT defined as (MAP_SHARED|MAP_PRIVATE|0x40)
I think a new syscall is better. It's very easy to make the mistake
that "MAP_DIRECT" defines a single flag vs representing a multi-bit
encoding.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help