alistair23-linux/drivers/vfio
Alex Williamson 58fec830fc vfio/type1: Fix unmap overflow off-by-one
The below referenced commit adds a test for integer overflow, but in
doing so prevents the unmap ioctl from ever including the last page of
the address space.  Subtract one to compare to the last address of the
unmap to avoid the overflow and wrap-around.

Fixes: 71a7d3d78e ("vfio/type1: silence integer overflow warning")
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1662291
Cc: stable@vger.kernel.org # v4.15+
Reported-by: Pei Zhang <pezhang@redhat.com>
Debugged-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2019-01-08 09:31:28 -07:00
..
mdev vfio/mdev: add static modifier to add_mdev_supported_type 2018-12-12 12:59:48 -07:00
pci vfio/pci: set TRACE_INCLUDE_PATH to fix the build error 2019-01-08 09:08:30 -07:00
platform vfio: platform: Fix using devices in PM Domains 2018-06-08 10:24:37 -06:00
Kconfig drivers/vfio: Allow type-1 IOMMU instantiation with all ARM/ARM64 IOMMUs 2018-09-25 13:01:28 -06:00
Makefile
vfio.c
vfio_iommu_spapr_tce.c powerpc/vfio/iommu/kvm: Do not pin device memory 2018-12-21 16:20:46 +11:00
vfio_iommu_type1.c vfio/type1: Fix unmap overflow off-by-one 2019-01-08 09:31:28 -07:00
vfio_spapr_eeh.c
virqfd.c