Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Matthew Wilcox
On Fri, Dec 08, 2017 at 12:13:31PM -0800, Kees Cook wrote: > On Fri, Dec 8, 2017 at 12:33 AM, Michal Hocko wrote: > > OK, this doesn't seem to lead to anywhere. The more this is discussed > > the more names we are getting. So you know what? I will resubmit and > > keep my

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Matthew Wilcox
On Fri, Dec 08, 2017 at 12:13:31PM -0800, Kees Cook wrote: > On Fri, Dec 8, 2017 at 12:33 AM, Michal Hocko wrote: > > OK, this doesn't seem to lead to anywhere. The more this is discussed > > the more names we are getting. So you know what? I will resubmit and > > keep my original name. If

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Florian Weimer
On 12/08/2017 03:27 PM, Pavel Machek wrote: On Fri 2017-12-08 22:08:07, Michael Ellerman wrote: 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)

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Florian Weimer
On 12/08/2017 03:27 PM, Pavel Machek wrote: On Fri 2017-12-08 22:08:07, Michael Ellerman wrote: 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)

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Cyril Hrubis
Hi! > > 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) > > Actually, if we had a time machine... would we even provide > MAP_REPLACE

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Cyril Hrubis
Hi! > > 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) > > Actually, if we had a time machine... would we even provide > MAP_REPLACE

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Kees Cook
On Fri, Dec 8, 2017 at 12:33 AM, Michal Hocko wrote: > OK, this doesn't seem to lead to anywhere. The more this is discussed > the more names we are getting. So you know what? I will resubmit and > keep my original name. If somebody really hates it then feel free to > nack the

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Kees Cook
On Fri, Dec 8, 2017 at 12:33 AM, Michal Hocko wrote: > OK, this doesn't seem to lead to anywhere. The more this is discussed > the more names we are getting. So you know what? I will resubmit and > keep my original name. If somebody really hates it then feel free to > nack the patch and push

RE: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread David Laight
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

RE: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread David Laight
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

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Pavel Machek
On Fri 2017-12-08 22:08:07, Michael Ellerman wrote: > Matthew Wilcox writes: > > > On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote: > >> On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman > >> wrote: > >> > Matthew Wilcox

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Pavel Machek
On Fri 2017-12-08 22:08:07, Michael Ellerman wrote: > Matthew Wilcox writes: > > > On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote: > >> On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman > >> wrote: > >> > Matthew Wilcox writes: > >> >> So, just like we currently say "exactly one of

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Michael Ellerman
Matthew Wilcox writes: > On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote: >> On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman wrote: >> > Matthew Wilcox writes: >> >> So, just like we currently say "exactly one of

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Michael Ellerman
Matthew Wilcox writes: > On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote: >> On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman wrote: >> > Matthew Wilcox writes: >> >> So, just like we currently say "exactly one of MAP_SHARED or MAP_PRIVATE", >> >> we could add a new paragraph saying

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Michal Hocko
On Thu 07-12-17 11:57:27, Matthew Wilcox wrote: > On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote: > > On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman > > wrote: > > > Matthew Wilcox writes: > > >> So, just like we currently say "exactly one

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-08 Thread Michal Hocko
On Thu 07-12-17 11:57:27, Matthew Wilcox wrote: > On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote: > > On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman > > wrote: > > > Matthew Wilcox writes: > > >> So, just like we currently say "exactly one of MAP_SHARED or > > >> MAP_PRIVATE", > >

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-07 Thread Matthew Wilcox
On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote: > On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman wrote: > > Matthew Wilcox writes: > >> So, just like we currently say "exactly one of MAP_SHARED or MAP_PRIVATE", > >> we could add a new

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-07 Thread Matthew Wilcox
On Thu, Dec 07, 2017 at 11:14:27AM -0800, Kees Cook wrote: > On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman wrote: > > Matthew Wilcox 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 >

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-07 Thread Kees Cook
On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman wrote: > Matthew Wilcox writes: > >> On Tue, Dec 05, 2017 at 08:54:35PM -0800, Matthew Wilcox wrote: >>> On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: >>> > Cyril Hrubis

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-07 Thread Kees Cook
On Wed, Dec 6, 2017 at 9:46 PM, Michael Ellerman wrote: > Matthew Wilcox writes: > >> On Tue, Dec 05, 2017 at 08:54:35PM -0800, Matthew Wilcox wrote: >>> On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: >>> > Cyril Hrubis writes: >>> > >>> > > Hi! >>> > >> > MAP_FIXED_UNIQUE

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread Michael Ellerman
Matthew Wilcox writes: > On Tue, Dec 05, 2017 at 08:54:35PM -0800, Matthew Wilcox wrote: >> On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: >> > Cyril Hrubis writes: >> > >> > > Hi! >> > >> > MAP_FIXED_UNIQUE >> > >> > MAP_FIXED_ONCE >> >

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread Michael Ellerman
Matthew Wilcox writes: > On Tue, Dec 05, 2017 at 08:54:35PM -0800, Matthew Wilcox wrote: >> On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: >> > Cyril Hrubis writes: >> > >> > > Hi! >> > >> > MAP_FIXED_UNIQUE >> > >> > MAP_FIXED_ONCE >> > >> > MAP_FIXED_FRESH >> > >> >> > >>

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread John Hubbard
On 12/06/2017 04:19 PM, Kees Cook wrote: > On Wed, Dec 6, 2017 at 1:08 AM, Michal Hocko wrote: >> On Wed 06-12-17 08:33:37, Rasmus Villemoes wrote: >>> On 2017-12-06 05:50, Michael Ellerman wrote: Michal Hocko writes: > On Wed 29-11-17

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread John Hubbard
On 12/06/2017 04:19 PM, Kees Cook wrote: > On Wed, Dec 6, 2017 at 1:08 AM, Michal Hocko wrote: >> On Wed 06-12-17 08:33:37, Rasmus Villemoes wrote: >>> On 2017-12-06 05:50, Michael Ellerman wrote: Michal Hocko writes: > On Wed 29-11-17 14:25:36, Kees Cook wrote: > It is safe in

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread Kees Cook
On Wed, Dec 6, 2017 at 1:08 AM, Michal Hocko wrote: > On Wed 06-12-17 08:33:37, Rasmus Villemoes wrote: >> On 2017-12-06 05:50, Michael Ellerman wrote: >> > Michal Hocko writes: >> > >> >> On Wed 29-11-17 14:25:36, Kees Cook wrote: >> >> It is safe in a

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread Kees Cook
On Wed, Dec 6, 2017 at 1:08 AM, Michal Hocko wrote: > On Wed 06-12-17 08:33:37, Rasmus Villemoes wrote: >> On 2017-12-06 05:50, Michael Ellerman wrote: >> > Michal Hocko writes: >> > >> >> On Wed 29-11-17 14:25:36, Kees Cook wrote: >> >> It is safe in a sense it doesn't perform any address space

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread Michal Hocko
On Wed 06-12-17 08:33:37, Rasmus Villemoes wrote: > On 2017-12-06 05:50, Michael Ellerman wrote: > > Michal Hocko writes: > > > >> On Wed 29-11-17 14:25:36, Kees Cook wrote: > >> It is safe in a sense it doesn't perform any address space dangerous > >> operations. mmap is

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread Michal Hocko
On Wed 06-12-17 08:33:37, Rasmus Villemoes wrote: > On 2017-12-06 05:50, Michael Ellerman wrote: > > Michal Hocko writes: > > > >> On Wed 29-11-17 14:25:36, Kees Cook wrote: > >> It is safe in a sense it doesn't perform any address space dangerous > >> operations. mmap is _inherently_ about the

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread Florian Weimer
On 12/06/2017 09:06 AM, John Hubbard wrote: On 12/05/2017 11:35 PM, Florian Weimer wrote: On 12/06/2017 08:33 AM, John Hubbard wrote: In that case, maybe: MAP_EXACT ? ...because that's the characteristic behavior. Is that true?  mmap still silently rounding up the length to the page

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread Florian Weimer
On 12/06/2017 09:06 AM, John Hubbard wrote: On 12/05/2017 11:35 PM, Florian Weimer wrote: On 12/06/2017 08:33 AM, John Hubbard wrote: In that case, maybe: MAP_EXACT ? ...because that's the characteristic behavior. Is that true?  mmap still silently rounding up the length to the page

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread John Hubbard
On 12/05/2017 11:35 PM, Florian Weimer wrote: > On 12/06/2017 08:33 AM, John Hubbard wrote: >> In that case, maybe: >> >> MAP_EXACT >> >> ? ...because that's the characteristic behavior. > > Is that true?  mmap still silently rounding up the length to the page size, I > assume, so even that

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-06 Thread John Hubbard
On 12/05/2017 11:35 PM, Florian Weimer wrote: > On 12/06/2017 08:33 AM, John Hubbard wrote: >> In that case, maybe: >> >> MAP_EXACT >> >> ? ...because that's the characteristic behavior. > > Is that true?  mmap still silently rounding up the length to the page size, I > assume, so even that

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Florian Weimer
On 12/06/2017 08:33 AM, John Hubbard wrote: In that case, maybe: MAP_EXACT ? ...because that's the characteristic behavior. Is that true? mmap still silently rounding up the length to the page size, I assume, so even that name is misleading. Thanks, Florian

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Florian Weimer
On 12/06/2017 08:33 AM, John Hubbard wrote: In that case, maybe: MAP_EXACT ? ...because that's the characteristic behavior. Is that true? mmap still silently rounding up the length to the page size, I assume, so even that name is misleading. Thanks, Florian

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread John Hubbard
On 12/05/2017 11:03 PM, Matthew Wilcox wrote: > On Tue, Dec 05, 2017 at 08:54:35PM -0800, Matthew Wilcox wrote: >> On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: >>> Cyril Hrubis writes: >>> Hi! >> MAP_FIXED_UNIQUE >> MAP_FIXED_ONCE >>

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread John Hubbard
On 12/05/2017 11:03 PM, Matthew Wilcox wrote: > On Tue, Dec 05, 2017 at 08:54:35PM -0800, Matthew Wilcox wrote: >> On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: >>> Cyril Hrubis writes: >>> Hi! >> MAP_FIXED_UNIQUE >> MAP_FIXED_ONCE >> MAP_FIXED_FRESH >

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Rasmus Villemoes
On 2017-12-06 05:50, Michael Ellerman wrote: > Michal Hocko writes: > >> On Wed 29-11-17 14:25:36, Kees Cook wrote: >> It is safe in a sense it doesn't perform any address space dangerous >> operations. mmap is _inherently_ about the address space so the context >> should be

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Rasmus Villemoes
On 2017-12-06 05:50, Michael Ellerman wrote: > Michal Hocko writes: > >> On Wed 29-11-17 14:25:36, Kees Cook wrote: >> It is safe in a sense it doesn't perform any address space dangerous >> operations. mmap is _inherently_ about the address space so the context >> should be kind of clear. > >

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Matthew Wilcox
On Tue, Dec 05, 2017 at 08:54:35PM -0800, Matthew Wilcox wrote: > On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: > > Cyril Hrubis writes: > > > > > Hi! > > >> > MAP_FIXED_UNIQUE > > >> > MAP_FIXED_ONCE > > >> > MAP_FIXED_FRESH > > >> > > >> Well, I can open a

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Matthew Wilcox
On Tue, Dec 05, 2017 at 08:54:35PM -0800, Matthew Wilcox wrote: > On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: > > Cyril Hrubis writes: > > > > > Hi! > > >> > MAP_FIXED_UNIQUE > > >> > MAP_FIXED_ONCE > > >> > MAP_FIXED_FRESH > > >> > > >> Well, I can open a poll for the

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Matthew Wilcox
On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: > Cyril Hrubis writes: > > > Hi! > >> > MAP_FIXED_UNIQUE > >> > MAP_FIXED_ONCE > >> > MAP_FIXED_FRESH > >> > >> Well, I can open a poll for the best name, but none of those you are > >> proposing sound much

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Matthew Wilcox
On Wed, Dec 06, 2017 at 03:51:44PM +1100, Michael Ellerman wrote: > Cyril Hrubis writes: > > > Hi! > >> > MAP_FIXED_UNIQUE > >> > MAP_FIXED_ONCE > >> > MAP_FIXED_FRESH > >> > >> Well, I can open a poll for the best name, but none of those you are > >> proposing sound much better to me. Yeah,

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Michael Ellerman
Cyril Hrubis writes: > Hi! >> > MAP_FIXED_UNIQUE >> > MAP_FIXED_ONCE >> > MAP_FIXED_FRESH >> >> Well, I can open a poll for the best name, but none of those you are >> proposing sound much better to me. Yeah, naming sucks... > > Given that MAP_FIXED replaces the previous

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Michael Ellerman
Cyril Hrubis writes: > Hi! >> > MAP_FIXED_UNIQUE >> > MAP_FIXED_ONCE >> > MAP_FIXED_FRESH >> >> Well, I can open a poll for the best name, but none of those you are >> proposing sound much better to me. Yeah, naming sucks... > > Given that MAP_FIXED replaces the previous mapping

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Michael Ellerman
Michal Hocko writes: > On Wed 29-11-17 14:25:36, Kees Cook wrote: >> On Wed, Nov 29, 2017 at 6:42 AM, Michal Hocko wrote: >> > The first patch introduced MAP_FIXED_SAFE which enforces the given >> > address but unlike MAP_FIXED it fails with ENOMEM if the

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-05 Thread Michael Ellerman
Michal Hocko writes: > On Wed 29-11-17 14:25:36, Kees Cook wrote: >> On Wed, Nov 29, 2017 at 6:42 AM, Michal Hocko wrote: >> > The first patch introduced MAP_FIXED_SAFE which enforces the given >> > address but unlike MAP_FIXED it fails with ENOMEM if the given range >> > conflicts with an

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-01 Thread Cyril Hrubis
Hi! > > MAP_FIXED_UNIQUE > > MAP_FIXED_ONCE > > MAP_FIXED_FRESH > > Well, I can open a poll for the best name, but none of those you are > proposing sound much better to me. Yeah, naming sucks... Given that MAP_FIXED replaces the previous mapping MAP_FIXED_NOREPLACE would probably be a best fit.

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-01 Thread Cyril Hrubis
Hi! > > MAP_FIXED_UNIQUE > > MAP_FIXED_ONCE > > MAP_FIXED_FRESH > > Well, I can open a poll for the best name, but none of those you are > proposing sound much better to me. Yeah, naming sucks... Given that MAP_FIXED replaces the previous mapping MAP_FIXED_NOREPLACE would probably be a best fit.

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Michal Hocko
On Wed 29-11-17 14:25:36, Kees Cook wrote: > On Wed, Nov 29, 2017 at 6:42 AM, Michal Hocko wrote: > > The first patch introduced MAP_FIXED_SAFE which enforces the given > > address but unlike MAP_FIXED it fails with ENOMEM if the given range > > conflicts with an existing one.

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Michal Hocko
On Wed 29-11-17 14:25:36, Kees Cook wrote: > On Wed, Nov 29, 2017 at 6:42 AM, Michal Hocko wrote: > > The first patch introduced MAP_FIXED_SAFE which enforces the given > > address but unlike MAP_FIXED it fails with ENOMEM if the given range > > conflicts with an existing one. The flag is

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 6:42 AM, Michal Hocko wrote: > The first patch introduced MAP_FIXED_SAFE which enforces the given > address but unlike MAP_FIXED it fails with ENOMEM if the given range > conflicts with an existing one. The flag is introduced as a completely I still

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 6:42 AM, Michal Hocko wrote: > The first patch introduced MAP_FIXED_SAFE which enforces the given > address but unlike MAP_FIXED it fails with ENOMEM if the given range > conflicts with an existing one. The flag is introduced as a completely I still think this name should

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 7:13 AM, Rasmus Villemoes wrote: > On 2017-11-29 15:42, Michal Hocko wrote: >> >> The first patch introduced MAP_FIXED_SAFE which enforces the given >> address but unlike MAP_FIXED it fails with ENOMEM if the given range >> conflicts with an

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 7:13 AM, Rasmus Villemoes wrote: > On 2017-11-29 15:42, Michal Hocko wrote: >> >> The first patch introduced MAP_FIXED_SAFE which enforces the given >> address but unlike MAP_FIXED it fails with ENOMEM if the given range >> conflicts with an existing one. > >

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 6:42 AM, Michal Hocko wrote: > Except we won't export expose the new semantic to the userspace at all. I'm confused: the changes in patch 1 are explicitly adding MAP_FIXED_SAFE to the uapi. If it's not supposed to be exposed, shouldn't it go somewhere

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Kees Cook
On Wed, Nov 29, 2017 at 6:42 AM, Michal Hocko wrote: > Except we won't export expose the new semantic to the userspace at all. I'm confused: the changes in patch 1 are explicitly adding MAP_FIXED_SAFE to the uapi. If it's not supposed to be exposed, shouldn't it go somewhere else? -Kees --

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Michal Hocko
On Wed 29-11-17 16:13:53, Rasmus Villemoes wrote: > On 2017-11-29 15:42, Michal Hocko wrote: [...] > >The flag is introduced as a completely > > new one rather than a MAP_FIXED extension because of the backward > > compatibility. We really want a never-clobber semantic even on older > > kernels

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Michal Hocko
On Wed 29-11-17 16:13:53, Rasmus Villemoes wrote: > On 2017-11-29 15:42, Michal Hocko wrote: [...] > >The flag is introduced as a completely > > new one rather than a MAP_FIXED extension because of the backward > > compatibility. We really want a never-clobber semantic even on older > > kernels

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Rasmus Villemoes
On 2017-11-29 15:42, Michal Hocko wrote: > > The first patch introduced MAP_FIXED_SAFE which enforces the given > address but unlike MAP_FIXED it fails with ENOMEM if the given range > conflicts with an existing one. [s/ENOMEM/EEXIST/, as it seems you also did in the actual patch and changelog]

Re: [PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Rasmus Villemoes
On 2017-11-29 15:42, Michal Hocko wrote: > > The first patch introduced MAP_FIXED_SAFE which enforces the given > address but unlike MAP_FIXED it fails with ENOMEM if the given range > conflicts with an existing one. [s/ENOMEM/EEXIST/, as it seems you also did in the actual patch and changelog]

[PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Michal Hocko
Hi, I am resending with RFC dropped and ask for inclusion. There haven't been any fundamental objections for the RFC [1]. I have also prepared a man page patch which is 0/3 of this series. This has started as a follow up discussion [2][3] resulting in the runtime failure caused by hardening patch

[PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-29 Thread Michal Hocko
Hi, I am resending with RFC dropped and ask for inclusion. There haven't been any fundamental objections for the RFC [1]. I have also prepared a man page patch which is 0/3 of this series. This has started as a follow up discussion [2][3] resulting in the runtime failure caused by hardening patch

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-27 Thread Khalid Aziz
On 11/24/2017 01:54 AM, Michal Hocko wrote: Are there any more concerns? So far the biggest one was the name. The other which suggests a flag as a modifier has been sorted out hopefully. Is there anymore more before we can consider this for merging? Well except for man page update which I will

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-27 Thread Khalid Aziz
On 11/24/2017 01:54 AM, Michal Hocko wrote: Are there any more concerns? So far the biggest one was the name. The other which suggests a flag as a modifier has been sorted out hopefully. Is there anymore more before we can consider this for merging? Well except for man page update which I will

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-24 Thread Michal Hocko
Are there any more concerns? So far the biggest one was the name. The other which suggests a flag as a modifier has been sorted out hopefully. Is there anymore more before we can consider this for merging? Well except for man page update which I will prepare of course. Can we target this to 4.16?

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-24 Thread Michal Hocko
Are there any more concerns? So far the biggest one was the name. The other which suggests a flag as a modifier has been sorted out hopefully. Is there anymore more before we can consider this for merging? Well except for man page update which I will prepare of course. Can we target this to 4.16?

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-22 Thread Vlastimil Babka
On 11/22/2017 02:12 PM, Michal Hocko wrote: > I will be probably stubborn and go with a shorter name I have currently. > I am not very fond-of-very-long-names. The short synonym for the last word is "German" SCNR :P

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-22 Thread Vlastimil Babka
On 11/22/2017 02:12 PM, Michal Hocko wrote: > I will be probably stubborn and go with a shorter name I have currently. > I am not very fond-of-very-long-names. The short synonym for the last word is "German" SCNR :P

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-22 Thread Michal Hocko
On Tue 21-11-17 17:48:31, John Hubbard wrote: [...] > Hi Michal, > > Yes, it really is useful for user space. I'll use CUDA as an example, but I > think anything that enforces a uniform virtual addressing scheme across CPUs > and devices, probably has to do something eerily similar. CUDA does

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-22 Thread Michal Hocko
On Tue 21-11-17 17:48:31, John Hubbard wrote: [...] > Hi Michal, > > Yes, it really is useful for user space. I'll use CUDA as an example, but I > think anything that enforces a uniform virtual addressing scheme across CPUs > and devices, probably has to do something eerily similar. CUDA does

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-21 Thread John Hubbard
On 11/20/2017 01:05 AM, Michal Hocko wrote: > On Fri 17-11-17 00:45:49, John Hubbard wrote: >> On 11/16/2017 04:14 AM, Michal Hocko wrote: >>> [Ups, managed to screw the subject - fix it] >>> >>> On Thu 16-11-17 11:18:58, Michal Hocko wrote: Hi, this has started as a follow up discussion

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-21 Thread John Hubbard
On 11/20/2017 01:05 AM, Michal Hocko wrote: > On Fri 17-11-17 00:45:49, John Hubbard wrote: >> On 11/16/2017 04:14 AM, Michal Hocko wrote: >>> [Ups, managed to screw the subject - fix it] >>> >>> On Thu 16-11-17 11:18:58, Michal Hocko wrote: Hi, this has started as a follow up discussion

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-20 Thread Michal Hocko
On Fri 17-11-17 00:45:49, John Hubbard wrote: > On 11/16/2017 04:14 AM, Michal Hocko wrote: > > [Ups, managed to screw the subject - fix it] > > > > On Thu 16-11-17 11:18:58, Michal Hocko wrote: > >> Hi, > >> this has started as a follow up discussion [1][2] resulting in the > >> runtime failure

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-20 Thread Michal Hocko
On Fri 17-11-17 00:45:49, John Hubbard wrote: > On 11/16/2017 04:14 AM, Michal Hocko wrote: > > [Ups, managed to screw the subject - fix it] > > > > On Thu 16-11-17 11:18:58, Michal Hocko wrote: > >> Hi, > >> this has started as a follow up discussion [1][2] resulting in the > >> runtime failure

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-17 Thread John Hubbard
On 11/16/2017 04:14 AM, Michal Hocko wrote: > [Ups, managed to screw the subject - fix it] > > On Thu 16-11-17 11:18:58, Michal Hocko wrote: >> Hi, >> this has started as a follow up discussion [1][2] resulting in the >> runtime failure caused by hardening patch [3] which removes MAP_FIXED >>

Re: [RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-17 Thread John Hubbard
On 11/16/2017 04:14 AM, Michal Hocko wrote: > [Ups, managed to screw the subject - fix it] > > On Thu 16-11-17 11:18:58, Michal Hocko wrote: >> Hi, >> this has started as a follow up discussion [1][2] resulting in the >> runtime failure caused by hardening patch [3] which removes MAP_FIXED >>

[RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-16 Thread Michal Hocko
[Ups, managed to screw the subject - fix it] On Thu 16-11-17 11:18:58, Michal Hocko wrote: > Hi, > this has started as a follow up discussion [1][2] resulting in the > runtime failure caused by hardening patch [3] which removes MAP_FIXED > from the elf loader because MAP_FIXED is inherently

[RFC PATCH 0/2] mm: introduce MAP_FIXED_SAFE

2017-11-16 Thread Michal Hocko
[Ups, managed to screw the subject - fix it] On Thu 16-11-17 11:18:58, Michal Hocko wrote: > Hi, > this has started as a follow up discussion [1][2] resulting in the > runtime failure caused by hardening patch [3] which removes MAP_FIXED > from the elf loader because MAP_FIXED is inherently