Re: [PATCH for-next v6 10/12] RDMA/efa: Add EFA verbs implementation

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

 



On 02-May-19 20:47, Jason Gunthorpe wrote:
> On Thu, May 02, 2019 at 11:46:00AM +0300, Leon Romanovsky wrote:
>> On Thu, May 02, 2019 at 11:28:40AM +0300, Gal Pressman wrote:
>>> On 01-May-19 19:40, Jason Gunthorpe wrote:
>>>> On Wed, May 01, 2019 at 01:48:22PM +0300, Gal Pressman wrote:
>>>>
>>>>> +int efa_mmap(struct ib_ucontext *ibucontext,
>>>>> +	     struct vm_area_struct *vma)
>>>>> +{
>>>>> +	struct efa_ucontext *ucontext = to_eucontext(ibucontext);
>>>>> +	struct efa_dev *dev = to_edev(ibucontext->device);
>>>>> +	u64 length = vma->vm_end - vma->vm_start;
>>>>> +	u64 key = vma->vm_pgoff << PAGE_SHIFT;
>>>>> +	struct efa_mmap_entry *entry;
>>>>> +
>>>>> +	ibdev_dbg(&dev->ibdev,
>>>>> +		  "start %#lx, end %#lx, length = %#llx, key = %#llx\n",
>>>>> +		  vma->vm_start, vma->vm_end, length, key);
>>>>> +
>>>>> +	if (length % PAGE_SIZE != 0 || !(vma->vm_flags & VM_SHARED)) {
>>>>> +		ibdev_dbg(&dev->ibdev,
>>>>> +			  "length[%#llx] is not page size aligned[%#lx] or VM_SHARED is not set [%#lx]\n",
>>>>> +			  length, PAGE_SIZE, vma->vm_flags);
>>>>> +		return -EINVAL;
>>>>> +	}
>>>>> +
>>>>> +	if (vma->vm_flags & VM_EXEC) {
>>>>> +		ibdev_dbg(&dev->ibdev, "Mapping executable pages is not permitted\n");
>>>>> +		return -EPERM;
>>>>> +	}
>>>>> +	vma->vm_flags &= ~VM_MAYEXEC;
>>>>
>>>> Also we dropped the MAYEXEC stuff
>>>
>>> Latest commit that had any MAYEXEC changes is 4eb6ab13b991 ("RDMA: Remove
>>> rdma_user_mmap_page"), where MAYEXEC is added not removed.
>>> Am I missing a followup patch?
>>
>> I'm not aware of any.
> 
> It was a mistake it wasn't removed from that commit too.

Can you explain please?



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux