On 28/06/16 17:17, Julien Grall wrote:
> void guest_physmap_remove_page(struct domain *d,
> gfn_t gfn,
> mfn_t mfn, unsigned int page_order)
> {
> - apply_p2m_changes(d, REMOVE,
> - pfn_to_paddr(gfn_x(gfn)),
> - pfn_to_paddr(gfn_x(gfn) + (1<<page_order)),
> - pfn_to_paddr(mfn_x(mfn)), MATTR_MEM, 0, p2m_invalid,
> - d->arch.p2m.default_access);
> + p2m_remove_mapping(d, gfn, (1 << page_order), mfn);
As you are changing these, it should be 1ul << page_order to avoid the
potential of overflow.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel