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-next>] [day] [month] [year] [list]
Message-ID: <20190516084833.757140bc@x1.home>
Date:   Thu, 16 May 2019 08:48:33 -0600
From:   Alex Williamson <alex.williamson@...hat.com>
To:     "richard.peng@...o.com" <richard.peng@...o.com>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        Alexey Kardashevskiy <aik@...abs.ru>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [PATCH] vfio: vfio_pci_nvlink2: use a vma helper function

[Cc Alexey + kvm]

On Thu, 16 May 2019 20:38:26 +0800
"richard.peng@...o.com" <richard.peng@...o.com> wrote:

> Use a vma helper function to simply code.
> 
> Signed-off-by: Peng Hao <richard.peng@...o.com>
> ---
>  drivers/vfio/pci/vfio_pci_nvlink2.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/vfio/pci/vfio_pci_nvlink2.c b/drivers/vfio/pci/vfio_pci_nvlink2.c
> index 32f695ffe128..dc42aa0e47f6 100644
> --- a/drivers/vfio/pci/vfio_pci_nvlink2.c
> +++ b/drivers/vfio/pci/vfio_pci_nvlink2.c
> @@ -161,8 +161,7 @@ static int vfio_pci_nvgpu_mmap(struct vfio_pci_device *vdev,
>  
>  	atomic_inc(&data->mm->mm_count);
>  	ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
> -			(vma->vm_end - vma->vm_start) >> PAGE_SHIFT,
> -			data->gpu_hpa, &data->mem);
> +			vma_pages(vma), data->gpu_hpa, &data->mem);
>  
>  	trace_vfio_pci_nvgpu_mmap(vdev->pdev, data->gpu_hpa, data->useraddr,
>  			vma->vm_end - vma->vm_start, ret);
> -- 
> 2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ