From: Greg KH <gregkh@linuxfoundation.org>
To: Ajay Kaher <akaher@vmware.com>
Cc: sashal@kernel.org, alex.williamson@redhat.com, cohuck@redhat.com,
peterx@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
srivatsab@vmware.com, srivatsa@csail.mit.edu,
vsirnapalli@vmware.com
Subject: Re: [PATCH v4.14.y 2/3] vfio-pci: Fault mmaps to enable vma tracking
Date: Tue, 8 Sep 2020 15:06:40 +0200 [thread overview]
Message-ID: <20200908130640.GC3075407@kroah.com> (raw)
In-Reply-To: <1599509828-23596-2-git-send-email-akaher@vmware.com>
On Tue, Sep 08, 2020 at 01:47:06AM +0530, Ajay Kaher wrote:
> From: Alex Williamson <alex.williamson@redhat.com>
>
> commit 11c4cd07ba111a09f49625f9e4c851d83daf0a22 upstream.
>
> Rather than calling remap_pfn_range() when a region is mmap'd, setup
> a vm_ops handler to support dynamic faulting of the range on access.
> This allows us to manage a list of vmas actively mapping the area that
> we can later use to invalidate those mappings. The open callback
> invalidates the vma range so that all tracking is inserted in the
> fault handler and removed in the close handler.
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> [Ajay: Regenerated the patch for v4.14]
> Signed-off-by: Ajay Kaher <akaher@vmware.com>
> ---
> drivers/vfio/pci/vfio_pci.c | 75 ++++++++++++++++++++++++++++++++++++-
> drivers/vfio/pci/vfio_pci_private.h | 7 ++++
> 2 files changed, 80 insertions(+), 2 deletions(-)
Oops, nope, this patch breaks the build:
drivers/vfio/pci/vfio_pci.c:1183:11: error: initialization of \u2018int (*)(struct vm_fault *)\u2019 from incompatible pointer type \u2018int (*)(struct vm_area_struct *, struct vm_fault *)\u2019 [-Werror=incompatible-pointer-types]
1183 | .fault = vfio_pci_mmap_fault,
| ^~~~~~~~~~~~~~~~~~~
drivers/vfio/pci/vfio_pci.c:1183:11: note: (near initialization for \u2018vfio_pci_mmap_ops.fault\u2019)
cc1: some warnings being treated as errors
Did you test this?
Please fix up and resend the whole series for 4.14.y
thanks,
greg k-h
next prev parent reply other threads:[~2020-09-08 17:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 20:17 [PATCH v4.14.y 1/3] vfio/type1: Support faulting PFNMAP vmas Ajay Kaher
2020-09-07 20:17 ` [PATCH v4.14.y 2/3] vfio-pci: Fault mmaps to enable vma tracking Ajay Kaher
2020-09-08 13:06 ` Greg KH [this message]
2020-09-07 20:17 ` [PATCH v4.14.y 3/3] vfio-pci: Invalidate mmaps and block MMIO access on disabled memory Ajay Kaher
2020-09-07 20:17 ` [PATCH v4.14.y 0/3] vfio: Fix for CVE-2020-12888 Ajay Kaher
2020-09-08 13:02 ` Greg KH
2020-09-08 14:29 ` Alex Williamson
2020-09-08 14:33 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200908130640.GC3075407@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akaher@vmware.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterx@redhat.com \
--cc=sashal@kernel.org \
--cc=srivatsa@csail.mit.edu \
--cc=srivatsab@vmware.com \
--cc=stable@vger.kernel.org \
--cc=vsirnapalli@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox