Re: [PATCH] vfio/type1: fix unmap all on ILP32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 25 Feb 2021 11:25:02 -0800
Steve Sistare <steven.sistare@xxxxxxxxxx> wrote:

> Some ILP32 architectures support mapping a 32-bit vaddr within a 64-bit
> iova space.  The unmap-all code uses 32-bit SIZE_MAX as an upper bound on
> the extent of the mappings within iova space, so mappings above 4G cannot
> be found and unmapped.  Use U64_MAX instead, and use u64 for size variables.
> This also fixes a static analysis bug found by the kernel test robot running
> smatch for ILP32.
> 
> Fixes: 0f53afa12bae ("vfio/type1: unmap cleanup")
> Fixes: c19650995374 ("vfio/type1: implement unmap all")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Steve Sistare <steven.sistare@xxxxxxxxxx>
> Reviewed-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
> ---
>  drivers/vfio/vfio_iommu_type1.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux