lkml.org 
[lkml]   [2023]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] vfio/type1: check pfn valid before converting to struct page
From
On Thu, May 18, 2023, Yan Zhao wrote:
> On Wed, May 17, 2023 at 08:19:04AM -0700, Sean Christopherson wrote:
> > On Tue, May 16, 2023, Yan Zhao wrote:
> > > vfio_pin_page_external() can return a phys_pfn for vma with VM_PFNMAP,
> > > e.g. for MMIO PFNs.
> > >
> > > It's necessary to check if it's a valid pfn before calling pfn_to_page().
> > >
> > > Fixes: 34a255e67615 ("vfio: Replace phys_pfn with pages for vfio_pin_pages()")
> >
> > Might be worth adding a blurb to call out that this is _not_ ABI breakage. Prior
> Do you mean "_not_ ABI breakage" with
> 34a255e67615 ("vfio: Replace phys_pfn with pages for vfio_pin_pages()")
> or with this fix commit?

Mostly the former. I brought it up because _if_ there was breakage in that commit,
then this fix would be "wrong" in the sense that it wouldn't undo any breakage, and
would likely make it harder to restore the previous behavior.

\
 
 \ /
  Last update: 2023-05-18 20:07    [W:0.132 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site