linux/drivers/infiniband
Michael J. Ruhl 71ff3384d1 IB/hfi1: Remove overly conservative VM_EXEC flag check
commit 7709b0dc26 upstream.

Applications that use the stack for execution purposes cause userspace PSM
jobs to fail during mmap().

Both Fortran (non-standard format parsing) and C (callback functions
located in the stack) applications can be written such that stack
execution is required. The linker notes this via the gnu_stack ELF flag.

This causes READ_IMPLIES_EXEC to be set which forces all PROT_READ mmaps
to have PROT_EXEC for the process.

Checking for VM_EXEC bit and failing the request with EPERM is overly
conservative and will break any PSM application using executable stacks.

Cc: <stable@vger.kernel.org> #v4.14+
Fixes: 1222026764 ("IB/hfi: Protect against writable mmap")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-06 17:30:13 +01:00
..
core RDMA/nldev: Don't expose unsafe global rkey to regular user 2019-01-22 21:40:34 +01:00
hw IB/hfi1: Remove overly conservative VM_EXEC flag check 2019-02-06 17:30:13 +01:00
sw rxe: IB_WR_REG_MR does not capture MR's iova field 2019-01-26 09:32:36 +01:00
ulp RDMA/srpt: Fix a use-after-free in the channel release code 2019-01-13 09:51:09 +01:00
Kconfig IB/ucm: fix UCM link error 2018-08-21 16:56:32 -06:00
Makefile