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

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


  • To: Andrii Anisov <andrii.anisov@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Fri, 19 Jul 2019 09:37:14 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KH1PLlHCFefDkA6WJHWkhSf5/WW2gouqizP2I3zC7cg=; b=HCasVwBT//4T8d9zqRSM+TOBT0DCB2DTswXubKydYM1Se/47hvDKsdjG6q8ZBalr/1pmgWWlgwnZjHbxhjVvbUeHvYoSk3t5sOpnnT1/v1qj6glCmbxDDzJQZ96WknBfLeVFVsla4RiAtFT6izFwVbOul2EO2kRQZjTXDcA4lSnS0kktNpY+KI9Gk6HXIPLK9GKMKeQrCjmLDAbNT9S8Q4OFhgx/QlLqiQL6kjc/cYRbPXWnMrat4z6yCDoQ5mLGSs5dUj8O24gcQSQ7XMahiXNUFqzSoEY/egjxO863sLlPghYtNendgoXOlBq+j5htNgPy2Pv5SiiNaEOXtub0FQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hmQx02dzO13qS3fNavCKyXDKc7WmutGWRemAhlsQPauVyZ+NYKe8sXG5kCPrErpWw/MhiKOGCZC+oHHEDvDxyspwCqVXrds66348lVhrkkWCQ4F6K9WdtWvckLhQU+NWs5Tw4pXQGfBLQ9i0vMn3gcN2DLqOeVxGlCtKHwJHodpJPOZhSh/tl2wXBhGaUq6YE82htqx1EjRDdpMYxmkBRIPBMNRFojF+FdW8rxfaw6Wsy6oZIA0xFWKCwkLvLXbU+smZWH7xhXh3qoiGLFVcH1NpV0EidbRJ5jUEyO/mbOqUbUEKt2GbXfGXPD/7ANje1Un4c95zyYXCW41ldJ/2Iw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Andrii Anisov <andrii_anisov@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 19 Jul 2019 09:38:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVPhWLg4cyYnQWKUW8aYX9saIQug==
  • Thread-topic: [PATCH] vunmap: let vunmap align virtual address by itself

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.

> This also makes it consistent with how {,un}map_domain_page()
> currently works.
> 
> 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.

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