Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-26 Thread Kirill A. Shutemov
On Sat, Aug 26, 2017 at 03:46:22PM -0700, Dan Williams wrote: > On Sat, Aug 26, 2017 at 12:50 PM, Helge Deller wrote: > > On 26.08.2017 17:15, Dan Williams wrote: > [..] > >> I have not seen any patches for parisc pmem+dax enabling so it seems > >> too early to worry about these "last mile" enabli

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-26 Thread Dan Williams
On Sat, Aug 26, 2017 at 12:50 PM, Helge Deller wrote: > On 26.08.2017 17:15, Dan Williams wrote: [..] >> I have not seen any patches for parisc pmem+dax enabling so it seems >> too early to worry about these "last mile" enabling features of >> MAP_DIRECT and MAP_SYNC. In particular parisc doesn't

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-26 Thread Helge Deller
On 26.08.2017 17:15, Dan Williams wrote: > On Sat, Aug 26, 2017 at 12:40 AM, Helge Deller wrote: >> * Dan Williams : >>> On Fri, Aug 25, 2017 at 9:19 AM, Helge Deller wrote: On 25.08.2017 18:16, Kirill A. Shutemov wrote: > On Fri, Aug 25, 2017 at 09:02:36AM -0700, Christoph Hellwig wrote

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-26 Thread Dan Williams
On Sat, Aug 26, 2017 at 12:40 AM, Helge Deller wrote: > * Dan Williams : >> On Fri, Aug 25, 2017 at 9:19 AM, Helge Deller wrote: >> > On 25.08.2017 18:16, Kirill A. Shutemov wrote: >> >> On Fri, Aug 25, 2017 at 09:02:36AM -0700, Christoph Hellwig wrote: >> >>> On Fri, Aug 25, 2017 at 06:58:03PM +

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-26 Thread Helge Deller
* Dan Williams : > On Fri, Aug 25, 2017 at 9:19 AM, Helge Deller wrote: > > On 25.08.2017 18:16, Kirill A. Shutemov wrote: > >> On Fri, Aug 25, 2017 at 09:02:36AM -0700, Christoph Hellwig wrote: > >>> On Fri, Aug 25, 2017 at 06:58:03PM +0300, Kirill A. Shutemov wrote: > Not all archs are read

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-25 Thread Dan Williams
On Fri, Aug 25, 2017 at 9:19 AM, Helge Deller wrote: > On 25.08.2017 18:16, Kirill A. Shutemov wrote: >> On Fri, Aug 25, 2017 at 09:02:36AM -0700, Christoph Hellwig wrote: >>> On Fri, Aug 25, 2017 at 06:58:03PM +0300, Kirill A. Shutemov wrote: Not all archs are ready for this: arch/

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-25 Thread Kirill A. Shutemov
On Fri, Aug 25, 2017 at 04:19:19PM +, Helge Deller wrote: > On 25.08.2017 18:16, Kirill A. Shutemov wrote: > > On Fri, Aug 25, 2017 at 09:02:36AM -0700, Christoph Hellwig wrote: > >> On Fri, Aug 25, 2017 at 06:58:03PM +0300, Kirill A. Shutemov wrote: > >>> Not all archs are ready for this: > >>

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-25 Thread Helge Deller
On 25.08.2017 18:16, Kirill A. Shutemov wrote: > On Fri, Aug 25, 2017 at 09:02:36AM -0700, Christoph Hellwig wrote: >> On Fri, Aug 25, 2017 at 06:58:03PM +0300, Kirill A. Shutemov wrote: >>> Not all archs are ready for this: >>> >>> arch/parisc/include/uapi/asm/mman.h:#define MAP_TYPE0x03

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-25 Thread Kirill A. Shutemov
On Fri, Aug 25, 2017 at 09:02:36AM -0700, Christoph Hellwig wrote: > On Fri, Aug 25, 2017 at 06:58:03PM +0300, Kirill A. Shutemov wrote: > > Not all archs are ready for this: > > > > arch/parisc/include/uapi/asm/mman.h:#define MAP_TYPE0x03/* > > Mask for type of mapping */ > > arc

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-25 Thread Christoph Hellwig
On Fri, Aug 25, 2017 at 06:58:03PM +0300, Kirill A. Shutemov wrote: > Not all archs are ready for this: > > arch/parisc/include/uapi/asm/mman.h:#define MAP_TYPE0x03/* > Mask for type of mapping */ > arch/parisc/include/uapi/asm/mman.h:#define MAP_FIXED 0x04/* > Inte

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-25 Thread Kirill A. Shutemov
On Fri, Aug 25, 2017 at 06:00:11AM -0700, Christoph Hellwig wrote: > On Thu, Aug 24, 2017 at 10:36:02AM -0700, Dan Williams wrote: > > I'll let Andy and Kirill restate their concerns, but one of the > > arguments that swayed me is that any new mmap flag with this hack must > > be documented to only

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-25 Thread Christoph Hellwig
On Thu, Aug 24, 2017 at 10:36:02AM -0700, Dan Williams wrote: > I'll let Andy and Kirill restate their concerns, but one of the > arguments that swayed me is that any new mmap flag with this hack must > be documented to only work with MAP_SHARED and that MAP_PRIVATE is > silently ignored. I agree w

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-24 Thread Dan Williams
On Thu, Aug 24, 2017 at 9:55 AM, Christoph Hellwig wrote: > On Wed, Aug 23, 2017 at 04:48:51PM -0700, Dan Williams wrote: >> The mmap(2) 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 b

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-24 Thread Christoph Hellwig
On Wed, Aug 23, 2017 at 04:48:51PM -0700, Dan Williams wrote: > The mmap(2) 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 sup

Re: [PATCH v6 3/5] mm: introduce mmap3 for safely defining new mmap flags

2017-08-24 Thread Jan Kara
On Wed 23-08-17 16:48:51, Dan Williams wrote: > The mmap(2) 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 support. Define a n