linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matan Barak (External)" <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
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	[thread overview]
Message-ID: <570FA3B6.20301@mellanox.com> (raw)
In-Reply-To: <20160414135651.GA18711-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.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

  parent reply	other threads:[~2016-04-14 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 13:52 [PATCH for-rdma] IB/mlx5: Allow mapping the free running counter on PROT_EXEC Matan Barak
     [not found] ` <1460641930-5118-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-04-14 13:56   ` Christoph Hellwig
     [not found]     ` <20160414135651.GA18711-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-14 14:05       ` Matan Barak (External) [this message]
     [not found]         ` <570FA3B6.20301-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-04-14 14:29           ` Christoph Hellwig
2016-04-14 14:23       ` Haggai Eran
2016-05-13 19:43   ` Doug Ledford

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=570FA3B6.20301@mellanox.com \
    --to=matanb-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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).