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

Re: [Xen-devel] [PATCH for-4.9] x86/mm: Fix incorrect unmapping of 2MB and 1GB pages



On 10/05/17 11:26, Jan Beulich wrote:
>>>> On 10.05.17 at 11:43, <igor.druzhinin@xxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/mm/p2m-ept.c
>> +++ b/xen/arch/x86/mm/p2m-ept.c
>> @@ -681,6 +681,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, 
>> mfn_t mfn,
>>      ept_entry_t *table, *ept_entry = NULL;
>>      unsigned long gfn_remainder = gfn;
>>      unsigned int i, target = order / EPT_TABLE_ORDER;
>> +    unsigned long mfn_mask = mfn_valid(mfn) ? mfn_x(mfn) : 0;
> 
> Aiui MMIO pages will come here too, so an mfn_valid() check here
> (and below) is too lax.

The resulting order will never be higher than the order passed in by the
caller.  Assuming that the caller is setting an entire 2MiB (or 1GiB)
region as MMIO, is it not valid to set a 2MiB or 1GiB entry as such?
The code seems to be written in such a way that such entries are expected.

 -George


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

 


Rackspace

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