lkml.org 
[lkml]   [2023]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vfio/type1: check pfn valid before converting to struct page
On Thu, May 18, 2023 at 11:07:09AM -0700, Sean Christopherson wrote:
> 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.

Ok. Let me post v2 to describe the problem and background clearly.

Thanks!

\
 
 \ /
  Last update: 2023-05-19 03:51    [W:0.077 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site