[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored



On Tue, Mar 19, 2019 at 02:16:44PM +0000, Anthony PERARD wrote:
> On Mon, Mar 18, 2019 at 10:43:12PM +0100, Marek Marczykowski-Górecki wrote:
> > On Mon, Mar 18, 2019 at 06:37:31PM +0100, Roger Pau Monne wrote:
> > > Or if it's not possible to honor the hinted address an error is returned
> > > instead. 
> > 
> > Just to be sure: MAP_FIXED will cause to map at specified address, even
> > if something is mapped there already. From mmap(2):
> 
> That should be fine. We do want to replace an exiting mapping (which is
> munmap before the mmap call), but it would have been nice to know when
> something is already mapped, to detect programming error.

FreeBSD has MAP_EXCL to be used in conjunction with MAP_FIXED, and
Linux has MAP_FIXED_NOREPLACE to achieve this behavior. I think the
current fix is fine for now, but we might want to look into using
those if further issues are found.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.