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 Jason