stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: dledford@redhat.com, linux-rdma@vger.kernel.org,
	"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
	Mike Marciniszyn <mike.marciniszyn@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH for-rc 6/7] IB/hfi1: Remove overly conservative VM_EXEC flag check
Date: Fri, 18 Jan 2019 14:02:35 -0700	[thread overview]
Message-ID: <20190118210235.GA20663@ziepe.ca> (raw)
In-Reply-To: <20190117204159.30826.92063.stgit@scvm10.sc.intel.com>

On Thu, Jan 17, 2019 at 12:42:04PM -0800, Dennis Dalessandro wrote:
> From: Michael J. Ruhl <michael.j.ruhl@intel.com>
> 
> 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@vger.kernel.org> #v4.14+
> Fixes: 12220267645c ("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>
> ---
>  drivers/infiniband/hw/hfi1/file_ops.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

applied to for-next

Thanks,
Jason

  reply	other threads:[~2019-01-18 21:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 20:40 [PATCH for-rc 0/7] hfi1 and qib patches for rc Dennis Dalessandro
2019-01-17 20:41 ` [PATCH for-rc 5/7] IB/hfi1: Close race condition on user context disable and close Dennis Dalessandro
2019-01-17 21:12   ` Jason Gunthorpe
2019-01-17 21:32     ` Ruhl, Michael J
     [not found]   ` <20190122155611.B55A0217F9@mail.kernel.org>
2019-01-22 16:24     ` Ruhl, Michael J
2019-01-17 20:42 ` [PATCH for-rc 6/7] IB/hfi1: Remove overly conservative VM_EXEC flag check Dennis Dalessandro
2019-01-18 21:02   ` Jason Gunthorpe [this message]
2019-01-18 21:03     ` Jason Gunthorpe
2019-01-17 20:42 ` [PATCH for-rc 7/7] IB/hfi1: Add limit test for RC/UC send via loopback Dennis Dalessandro
2019-01-18 21:04   ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190118210235.GA20663@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michael.j.ruhl@intel.com \
    --cc=mike.marciniszyn@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).