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

Re: [Xen-devel] [PATCH] vunmap: let vunmap align virtual address by itself





On 19.07.19 12:37, Jan Beulich wrote:
On 18.07.2019 19:11, Andrii Anisov wrote:
Let vunmap align passed virtual address by PAGE_SIZE.

Despite seeing Andrew's R-b you've already got I'd like to point out
that this increases the risk of some code passing the wrong pointer
into here. {,un}map_domain_page() act on single pages only, so there's
no ambiguity. When talking about multi-page regions though, not undoing
arithmetic previously done may mean actually pointing at other than the
first page of the mapping.

Well, what we are moving into vunmap(), is a page alignment only. It can't save 
us from the wrong pointer, even if it is done outside the vunmap().

With the main change, also:
   - strip all existing vunmap() calls from prior masking

_If_ we are to go this route, then unmap_domain_page_global()
callers should also be adjusted. There, as for unmap_domain_page(),
I agree it would make sense to be more tolerant.

I've found two page alignments prior to `unmap_domain_page_global()` call. 
Should I wipe them in this patch, or in separate?

--
Sincerely,
Andrii Anisov.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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