From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67757C1B0F7 for ; Fri, 18 Jan 2019 21:03:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 32FC020449 for ; Fri, 18 Jan 2019 21:03:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="ddbfJsHm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729438AbfARVD2 (ORCPT ); Fri, 18 Jan 2019 16:03:28 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38890 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729507AbfARVD2 (ORCPT ); Fri, 18 Jan 2019 16:03:28 -0500 Received: by mail-pf1-f194.google.com with SMTP id q1so7171679pfi.5 for ; Fri, 18 Jan 2019 13:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=em+aC98ZvlRA8KCvERDhnwFmUPrngchXdPVfAQSbafE=; b=ddbfJsHmXZN+2pWyWcwihd1r8pj4xmCLDytSJWWgSv4e6HbuKWpHRLE8YhXJ2uvsgA dPYXKb/n16GehOC/1JIhfd8gKSIomSs98TxaAnFHMWQjWxlSBKC4KAsWuEtU0lW4VUFX RSz+opE1hKPtVFRHOhqfQ+iL+qc4DblBqQC/XqUj40qfnh94HaeobI34MJxzZ0s7NGsm mK0v0wXSAXgGyqPKlhbYFdHjrOEYWeFeeePTcpJO6gwp1ICiAL91KZIqIW17VDijT/k2 nplUMnSRvSSXZ5m89EvYWxgZPxFCXOtlBT13q05+8ZZ3EphZX62nGZrrguJDPnpYjWWR 4x9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=em+aC98ZvlRA8KCvERDhnwFmUPrngchXdPVfAQSbafE=; b=luYg07K9gG13CcOc71HWkWtJ4ryuViyBTd8qzEDeAHpEq89EZzlahrvae3pU/QKWZE yQwXVkm95lE3m006myHy/N4bdMJ36n1xOa0+9hnZvmLDtpaxqtFKcvtEd7xaP2QraKfA YsupxkqNLaLkz0OOEsLJo0fchmqEmIsARCNi5bUox5XHtqE4/AH1UDsPf1M9oA0PvPzB //r4pgIpDvVADCLCEzYgSpdsCuEhqC0SbdgbMyfKo58Qx6b3u8SBcdheNTXUgCjoAVNz tYHLQXkXSCkSlceRWoZYlTTAS2f7iKjzz5JDTypILmuHZ+bx3sAR+rBy5+P2+1+q+YeF i3Zw== X-Gm-Message-State: AJcUukdIF49ldI1TNDZhp02M/8W9hqfRcG1CiPhW9M9C0y2YCxqQQCbK 5v0zmvgwRUfWW5N5Vhltf8syXg== X-Google-Smtp-Source: ALg8bN65QXqu1G0ZNzQxmvAeXj2zrmHhYmYcYrNm4GdikDjNyeYGaSof/6pHTy7tMUEp5jrKdpVs9A== X-Received: by 2002:a63:981:: with SMTP id 123mr19406537pgj.444.1547845407653; Fri, 18 Jan 2019 13:03:27 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id a4sm5724683pgv.70.2019.01.18.13.03.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Jan 2019 13:03:27 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gkbIU-0005Qy-BD; Fri, 18 Jan 2019 14:03:26 -0700 Date: Fri, 18 Jan 2019 14:03:26 -0700 From: Jason Gunthorpe To: Dennis Dalessandro Cc: dledford@redhat.com, linux-rdma@vger.kernel.org, "Michael J. Ruhl" , Mike Marciniszyn , Ira Weiny , stable@vger.kernel.org Subject: Re: [PATCH for-rc 6/7] IB/hfi1: Remove overly conservative VM_EXEC flag check Message-ID: <20190118210326.GB4759@ziepe.ca> References: <20190117203920.30826.76720.stgit@scvm10.sc.intel.com> <20190117204159.30826.92063.stgit@scvm10.sc.intel.com> <20190118210235.GA20663@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190118210235.GA20663@ziepe.ca> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 > > > > 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: #v4.14+ > > Fixes: 12220267645c ("IB/hfi: Protect against writable mmap") > > Reviewed-by: Mike Marciniszyn > > Reviewed-by: Dennis Dalessandro > > Reviewed-by: Ira Weiny > > Signed-off-by: Michael J. Ruhl > > Signed-off-by: Dennis Dalessandro > > drivers/infiniband/hw/hfi1/file_ops.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > applied to for-next sorry for-rc Jason