Re: [PATCH v2] vfio/type1: Use follow_pte()

From: Peter Xu
Date: Tue Feb 16 2021 - 18:51:41 EST


On Tue, Feb 16, 2021 at 03:49:34PM -0700, Alex Williamson wrote:
> follow_pfn() doesn't make sure that we're using the correct page
> protections, get the pte with follow_pte() so that we can test
> protections and get the pfn from the pte.
>
> Fixes: 5cbf3264bc71 ("vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn()")
> Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>
> Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx>

Reviewed-by: Peter Xu <peterx@xxxxxxxxxx>

--
Peter Xu