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

2017-12-19 Thread Michal Hocko
On Tue 19-12-17 12:40:16, David Laight wrote: > From: Edward Napierala > > Sent: 14 December 2017 14:55 > > > > On 1214T1415, Michal Hocko wrote: > > > On Thu 14-12-17 12:44:17, Edward Napierala wrote: > > > > Regarding the name - how about adopting MAP_EXCL? It was introduced in > > > > FreeBSD,

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

2017-12-19 Thread David Laight
From: Edward Napierala > Sent: 14 December 2017 14:55 > > On 1214T1415, Michal Hocko wrote: > > On Thu 14-12-17 12:44:17, Edward Napierala wrote: > > > Regarding the name - how about adopting MAP_EXCL? It was introduced in > > > FreeBSD, > > > and seems to do exactly this; quoting mmap(2): > > > >

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

2017-12-15 Thread Michael Ellerman
Kees Cook writes: > On Wed, Dec 13, 2017 at 1:25 AM, Michal Hocko wrote: >> >> Hi, >> I am resending with some minor updates based on Michael's review and >> ask for inclusion. There haven't been any fundamental objections for >> the RFC [1] nor the previous version [2]. The biggest discussion

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

2017-12-14 Thread Edward Napierala
On 1214T1415, Michal Hocko wrote: > On Thu 14-12-17 12:44:17, Edward Napierala wrote: > > Regarding the name - how about adopting MAP_EXCL? It was introduced in > > FreeBSD, > > and seems to do exactly this; quoting mmap(2): > > > > MAP_FIXEDDo not permit the system to select a different addr

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

2017-12-14 Thread Michal Hocko
On Thu 14-12-17 12:44:17, Edward Napierala wrote: > Regarding the name - how about adopting MAP_EXCL? It was introduced in > FreeBSD, > and seems to do exactly this; quoting mmap(2): > > MAP_FIXEDDo not permit the system to select a different address > than the one spe

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

2017-12-13 Thread David Goldblatt
(+cc the jemalloc jasone; -cc,+bcc the Google jasone). The only time we would want MAP_FIXED (or rather, a non-broken variant) is in the middle of trying to expand an allocation in place; "atomic address range probing in the multithreaded programs" describes our use case pretty well. That's in a p

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

2017-12-13 Thread Andrew Morton
On Wed, 13 Dec 2017 10:25:48 +0100 Michal Hocko wrote: > > Hi, > I am resending with some minor updates based on Michael's review and > ask for inclusion. There haven't been any fundamental objections for > the RFC [1] nor the previous version [2]. The biggest discussion > revolved around the n

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

2017-12-13 Thread Kees Cook
On Wed, Dec 13, 2017 at 1:25 AM, Michal Hocko wrote: > > Hi, > I am resending with some minor updates based on Michael's review and > ask for inclusion. There haven't been any fundamental objections for > the RFC [1] nor the previous version [2]. The biggest discussion > revolved around the namin

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

2017-12-13 Thread Michal Hocko
On Wed 13-12-17 04:25:33, Matthew Wilcox wrote: > On Wed, Dec 13, 2017 at 10:25:48AM +0100, Michal Hocko wrote: > > I am afraid we can bikeshed this to death and there will still be > > somebody finding yet another better name. Therefore I've decided to > > stick with my original MAP_FIXED_SAFE. Wh

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

2017-12-13 Thread Matthew Wilcox
On Wed, Dec 13, 2017 at 10:25:48AM +0100, Michal Hocko wrote: > I am afraid we can bikeshed this to death and there will still be > somebody finding yet another better name. Therefore I've decided to > stick with my original MAP_FIXED_SAFE. Why? Well, because it keeps the > MAP_FIXED prefix which s

[PATCH v2 0/2] mm: introduce MAP_FIXED_SAFE

2017-12-13 Thread Michal Hocko
Hi, I am resending with some minor updates based on Michael's review and ask for inclusion. There haven't been any fundamental objections for the RFC [1] nor the previous version [2]. The biggest discussion revolved around the naming. There were many suggestions flowing around MAP_REQUIRED, MAP_E