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

Re: [Xen-devel] The hypercall will fail and return EFAULT when the page becomes COW by forking process in linux



> From: Ian Campbell [mailto:Ian.Campbell@xxxxxxxxxx]
> Sent: Tuesday, July 24, 2012 9:06 PM
> 
> Hrm. yes. This basically harks back to the use of mlock as a surrogate
> for the requirement to properly lock down memory for use as a hypercall
> argument. This is flawed in ways other than this (i.e. NUMA memory
> migration would also break it).
> 
> The correct answer here is a special device (e.g. /dev/xen/hypercall?)
> which can be mmap by libxc to provide memory specifically for this
> purspoe which is fully locked down (e.g. VM_DONTCOPY and whatever else
> is required).

Thanks for your reply. I see the madvise syscall can make the vma to be 
VM_DONTCOPY by deliverying MADV_DONTFORK advice. I'll fixup and test it.
> 
> The libxc "osdep" interface (see xenctrlosdep.h) provides a framework
> for doing this, it just doesn't actually implement the use of the
> special driver yet.
> 
> Is that something you might be interested in coding up?
> 
> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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