Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero()

2019-08-27 Thread Leon Romanovsky
On Wed, Aug 28, 2019 at 08:57:19AM +0530, Souptick Joarder wrote: > On Tue, Aug 27, 2019 at 9:19 PM Jason Gunthorpe wrote: > > > > On Tue, Aug 27, 2019 at 01:48:57AM +0530, Souptick Joarder wrote: > > > On Mon, Aug 26, 2019 at 5:50 PM Jason Gunthorpe wrote: > > > > > > > > On Mon, Aug 26, 2019 at

Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero()

2019-08-27 Thread Souptick Joarder
On Tue, Aug 27, 2019 at 9:19 PM Jason Gunthorpe wrote: > > On Tue, Aug 27, 2019 at 01:48:57AM +0530, Souptick Joarder wrote: > > On Mon, Aug 26, 2019 at 5:50 PM Jason Gunthorpe wrote: > > > > > > On Mon, Aug 26, 2019 at 01:32:09AM +0530, Souptick Joarder wrote: > > > > On Mon, Aug 26, 2019 at 1:1

Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero()

2019-08-27 Thread Jason Gunthorpe
On Tue, Aug 27, 2019 at 01:48:57AM +0530, Souptick Joarder wrote: > On Mon, Aug 26, 2019 at 5:50 PM Jason Gunthorpe wrote: > > > > On Mon, Aug 26, 2019 at 01:32:09AM +0530, Souptick Joarder wrote: > > > On Mon, Aug 26, 2019 at 1:13 AM Jason Gunthorpe wrote: > > > > > > > > On Sun, Aug 25, 2019 at

Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero()

2019-08-26 Thread Souptick Joarder
On Mon, Aug 26, 2019 at 5:50 PM Jason Gunthorpe wrote: > > On Mon, Aug 26, 2019 at 01:32:09AM +0530, Souptick Joarder wrote: > > On Mon, Aug 26, 2019 at 1:13 AM Jason Gunthorpe wrote: > > > > > > On Sun, Aug 25, 2019 at 11:37:27AM +0530, Souptick Joarder wrote: > > > > First, length passed to mma

Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero()

2019-08-26 Thread Jason Gunthorpe
On Mon, Aug 26, 2019 at 01:32:09AM +0530, Souptick Joarder wrote: > On Mon, Aug 26, 2019 at 1:13 AM Jason Gunthorpe wrote: > > > > On Sun, Aug 25, 2019 at 11:37:27AM +0530, Souptick Joarder wrote: > > > First, length passed to mmap is checked explicitly against > > > PAGE_SIZE. > > > > > > Second,

Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero()

2019-08-25 Thread Souptick Joarder
On Mon, Aug 26, 2019 at 1:13 AM Jason Gunthorpe wrote: > > On Sun, Aug 25, 2019 at 11:37:27AM +0530, Souptick Joarder wrote: > > First, length passed to mmap is checked explicitly against > > PAGE_SIZE. > > > > Second, if vma->vm_pgoff is passed as non zero, it would return > > error. It appears l

Re: [PATCH] IB/mlx5: Convert to use vm_map_pages_zero()

2019-08-25 Thread Jason Gunthorpe
On Sun, Aug 25, 2019 at 11:37:27AM +0530, Souptick Joarder wrote: > First, length passed to mmap is checked explicitly against > PAGE_SIZE. > > Second, if vma->vm_pgoff is passed as non zero, it would return > error. It appears like driver is expecting vma->vm_pgoff to > be passed as 0 always. ?

[PATCH] IB/mlx5: Convert to use vm_map_pages_zero()

2019-08-24 Thread Souptick Joarder
First, length passed to mmap is checked explicitly against PAGE_SIZE. Second, if vma->vm_pgoff is passed as non zero, it would return error. It appears like driver is expecting vma->vm_pgoff to be passed as 0 always. otherwise throw error (not sure if done with a particular purpose). Rather driver