Re: [patch] uvm_mmap / little change proposal

2018-08-21 Thread David CARLIER
I knew it was not documented for a reason but why is it ? Just curious
... but it s ok if we drop this change ...
On Tue, 21 Aug 2018 at 16:38, Mark Kettenis  wrote:
>
> > From: "Todd C. Miller" 
> > Date: Tue, 21 Aug 2018 09:19:05 -0600
> >
> > On Tue, 21 Aug 2018 08:57:06 +0100, David CARLIER wrote:
> >
> > > For portability sake and to make it more "visible" I changed the
> > > __MAP_NOREPLACE to MAP_EXCL, documented it in the man page and also
> > > changed the errno to EEXIST instead (I thought it would reflect
> > > better the error in case the addressed mapped already exists but
> > > can be changed back in case ...).
> >
> > Does anyone other than FreeBSD define MAP_EXCL?  A quick google
> > search didn't turn up any other systems with it.
>
> The symbol starts with a double underscore for a reason.  We really
> didn't want this to be used outside of the very specific code in base
> that needs this.



Re: [patch] uvm_mmap / little change proposal

2018-08-21 Thread Mark Kettenis
> From: "Todd C. Miller" 
> Date: Tue, 21 Aug 2018 09:19:05 -0600
> 
> On Tue, 21 Aug 2018 08:57:06 +0100, David CARLIER wrote:
> 
> > For portability sake and to make it more "visible" I changed the
> > __MAP_NOREPLACE to MAP_EXCL, documented it in the man page and also
> > changed the errno to EEXIST instead (I thought it would reflect
> > better the error in case the addressed mapped already exists but
> > can be changed back in case ...).
> 
> Does anyone other than FreeBSD define MAP_EXCL?  A quick google
> search didn't turn up any other systems with it.

The symbol starts with a double underscore for a reason.  We really
didn't want this to be used outside of the very specific code in base
that needs this.



Re: [patch] uvm_mmap / little change proposal

2018-08-21 Thread David CARLIER
No one else .. Linux has MAP_FIXED_NOREPLACE which is
MAP_FIXED|MAP_EXCL equivalent...
On Tue, 21 Aug 2018 at 16:19, Todd C. Miller  wrote:
>
> On Tue, 21 Aug 2018 08:57:06 +0100, David CARLIER wrote:
>
> > For portability sake and to make it more "visible" I changed the
> > __MAP_NOREPLACE to MAP_EXCL, documented it in the man page and also
> > changed the errno to EEXIST instead (I thought it would reflect
> > better the error in case the addressed mapped already exists but
> > can be changed back in case ...).
>
> Does anyone other than FreeBSD define MAP_EXCL?  A quick google
> search didn't turn up any other systems with it.
>
>  - todd



Re: [patch] uvm_mmap / little change proposal

2018-08-21 Thread Todd C. Miller
On Tue, 21 Aug 2018 08:57:06 +0100, David CARLIER wrote:

> For portability sake and to make it more "visible" I changed the
> __MAP_NOREPLACE to MAP_EXCL, documented it in the man page and also
> changed the errno to EEXIST instead (I thought it would reflect
> better the error in case the addressed mapped already exists but
> can be changed back in case ...).

Does anyone other than FreeBSD define MAP_EXCL?  A quick google
search didn't turn up any other systems with it.

 - todd



[patch] uvm_mmap / little change proposal

2018-08-21 Thread David CARLIER
Hi,

For portability sake and to make it more "visible" I changed the
__MAP_NOREPLACE to MAP_EXCL, documented it in the man page and also changed the
errno to EEXIST instead (I thought it would reflect better the error
in case the addressed mapped already exists but can be changed back in
case ...).

Thanks.

Regards.


uvm_mmap.diff
Description: Binary data