RDMA/efa: Remove MAYEXEC flag check from mmap flow
authorGal Pressman <galpress@amazon.com>
Tue, 28 May 2019 12:46:13 +0000 (15:46 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 29 May 2019 16:13:03 +0000 (13:13 -0300)
MAYEXEC test was mistakenly added, remove it. Checking MAYEXEC in the
driver prevents it from working with userspace that uses things like EXEC
STACK. (ie some Fortran and other runtimes)

Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation")
Reported-by: Jason Gunthorpe <jgg@ziepe.ca>
Reviewed-by: Firas JahJah <firasj@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/efa/efa_verbs.c

index 6d6886c9009f20f0bf23da7c9d1d66af8a79b650..0fea5d63fdbe15dec340fc1d7defa27866d65eea 100644 (file)
@@ -1728,7 +1728,6 @@ int efa_mmap(struct ib_ucontext *ibucontext,
                ibdev_dbg(&dev->ibdev, "Mapping executable pages is not permitted\n");
                return -EPERM;
        }
-       vma->vm_flags &= ~VM_MAYEXEC;
 
        return __efa_mmap(dev, ucontext, vma, key, length);
 }