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

Re: [Xen-devel] [PATCH v6 05/11] arch, x86: check if mapping exists before memory_mapping removes it



Hi Jan,

On 22/04/14 09:34, Jan Beulich wrote:
On 21.04.14 at 15:44, <avanzini.arianna@xxxxxxxxx> wrote:
Currently, when a memory mapping is removed with the memory_mapping
DOMCTL, no check is performed on the existence of such a mapping.
This commit attempts to add such a consistency check to the code
performing the unmap.

I think this goes too far: Did you check that all existing tool stacks
actually pass a valid MFN for the unmap? It would seem quite natural
to me if some didn't, since tool stacks can be expected to know what
they're doing.


If the toolstack doesn't give a valid MFN that would mean that the toolstack can mess up the range permission.

On a previous mail, I suggested to skip the MFN parameter when the toolstack is unmapping the range. Xen will take care to translate the GFN into an MFN.

AFAIU, it's what we do on the other unmap hypercalls.

--
Julien Grall

_______________________________________________
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®.