lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200908130640.GC3075407@kroah.com>
Date:   Tue, 8 Sep 2020 15:06:40 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Ajay Kaher <akaher@...are.com>
Cc:     sashal@...nel.org, alex.williamson@...hat.com, cohuck@...hat.com,
        peterx@...hat.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        srivatsab@...are.com, srivatsa@...il.mit.edu,
        vsirnapalli@...are.com
Subject: Re: [PATCH v4.14.y 2/3] vfio-pci: Fault mmaps to enable vma tracking

On Tue, Sep 08, 2020 at 01:47:06AM +0530, Ajay Kaher wrote:
> From: Alex Williamson <alex.williamson@...hat.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@...hat.com>
> Signed-off-by: Alex Williamson <alex.williamson@...hat.com>
> [Ajay: Regenerated the patch for v4.14]
> Signed-off-by: Ajay Kaher <akaher@...are.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ