On Thu, Jan 17, 2019 at 12:42:04PM -0800, Dennis Dalessandro wrote: > From: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx> > > Applications that use the stack for execution purposes cause > 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. > > Because of this the EXECSTACK bit can be automatically set at link > time for any application. > > On application load, the ELF loader evaluates the EXECSTACK bit > for the application and it's linked libraries. It will set the > process VM flags to allow the stack to include the VM_EXEC bit > if the EXECSTACK bit is set. This flag is propagated to the > driver during the mmap() call in the vma flag bits. > > Checking for this bit and failing the request with EPERM is overly > conservative and will break any PSM application that has the bit set. > > Remove the VM_EXEC flag from the check. > > Cc: <stable@xxxxxxxxxxxxxxx> #v4.14+ > Fixes: 12220267645c ("IB/hfi: Protect against writable mmap") > Reviewed-by: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx> > Reviewed-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx> > Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx> > Signed-off-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx> > Signed-off-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx> > --- > drivers/infiniband/hw/hfi1/file_ops.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) applied to for-next Thanks, Jason