From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Matan Barak (External)" Subject: Re: [PATCH for-rdma] IB/mlx5: Allow mapping the free running counter on PROT_EXEC Date: Thu, 14 Apr 2016 17:05:42 +0300 Message-ID: <570FA3B6.20301@mellanox.com> References: <1460641930-5118-1-git-send-email-matanb@mellanox.com> <20160414135651.GA18711@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160414135651.GA18711-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Christoph Hellwig Cc: Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Majd Dibbiny , Haggai Eran List-Id: linux-rdma@vger.kernel.org On 14/04/2016 16:56, Christoph Hellwig wrote: > And why the hack do we set PROT_EXEC on a mapping of device resources? > Of course we don't (there's no good reason to do that). However, as written in the commit message, when READ_IMPLIES_EXEC is set in current->personality (mm/mmap.c): if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC)) if (!(file && path_noexec(&file->f_path))) prot |= PROT_EXEC; So, we don't want to fail in these cases. Regards, Matan -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html