[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
On Tue, 2012-08-07 at 12:05 +0100, Wangzhenguo wrote: > > -----Original Message----- > > From: Ian Campbell [mailto:Ian.Campbell@xxxxxxxxxx] > > Sent: Tuesday, August 07, 2012 6:07 PM > > > The entire point of the hypercall buffer is that it needs to be safe > > for use as a hypercall argument, therefore it does need to be protected. > > We won't protect pages in hypercall buffer cache. Hypercall buffer > cache belongs to xc_interface, parent process calls xc_interface_open > to get xc_interface handler, after fork, child process inherits the > handler, and also inherits hypercall buffer cache which belongs to it. > It will cause segment fault to access pages in the hypercall buffer > cache by being delivered to hypercall, because they are not > invalidate in the child process. So, We need restore the status of > pages before putting they to hypercall buffer cache, and prevent pages > from COW after being allocated in hyprecall buffer cache. I don't think we should expect it to be valid to keep an xc interface handle open after a fork. The child should open a fresh handle if it wants to keep interacting with xc. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |