Re: [PATCH for-rc 6/7] IB/hfi1: Remove overly conservative VM_EXEC flag check

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

 



On Fri, Jan 18, 2019 at 02:02:35PM -0700, Jason Gunthorpe wrote:
> 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

sorry for-rc

Jason



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux