linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>,
	linux-mm <linux-mm@kvack.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	tbsaunde@tbsaunde.org, robert@ocallahan.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing
Date: Sun, 25 Sep 2016 15:50:21 -0700	[thread overview]
Message-ID: <CA+55aFyL+qFsJpxQufgRKgWeB6Yj0e1oapdu5mdU9_t+zwtBjg@mail.gmail.com> (raw)
In-Reply-To: <1474842875.17726.38.camel@redhat.com>

On Sun, Sep 25, 2016 at 3:34 PM, Rik van Riel <riel@redhat.com> wrote:
>
> The patch looks good to me, too.
>
> Acked-by: Rik van Riel <riel@redhat.com>

Thanks, amended the commit since I hadn't pushed out yet.

Btw, the only reason this bug could happen is that we do that
"force=1" for remote vm accesses, which turns into FOLL_FORCE, which
in turn will turn into us allowing an access even when we technically
shouldn't.

I'd really like to re-open the "drop FOLL_FORCE entirely" discussion,
because the thing really is disgusting.

I realize that debuggers etc sometimes would want to punch through
PROT_NONE protections, and I also realize that right now we only have
a read/write flag, and we have that whole issue with "what if it's
executable but not readable", which currently FOLL_FORCE makes a
non-issue.

But at the same time, FOLL_FORCE really is a major nasty thing. It
shouldn't be a security issue (we still do check VM_MAY_READ/WRITE etc
to verify that even if something isn't readable or writable we *could*
have had permissions to do this), but this bug is a prime example of
how it violates our deeply held beliefs of how VM permissions *should*
work, and it screwed up the numa case as a result.

So how about we consider getting rid of FOLL_FORCE? Addign Hugh
Dickins to the cc, because I think he argued for that many moons ago..

                  Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-09-25 22:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-11 22:54 [PATCH] mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing Lorenzo Stoakes
2016-09-11 22:59 ` Lorenzo Stoakes
2016-09-25 18:47 ` Lorenzo Stoakes
2016-09-25 20:52   ` Linus Torvalds
2016-09-25 22:24     ` Linus Torvalds
2016-09-25 22:34     ` Rik van Riel
2016-09-25 22:50       ` Linus Torvalds [this message]
2016-09-25 23:28         ` Hugh Dickins
2016-09-26  0:49         ` Rik van Riel
2016-09-26  1:05           ` Linus Torvalds
2016-10-07 10:07         ` Lorenzo Stoakes
2016-10-07 15:34           ` Linus Torvalds
2016-10-07 16:22             ` Lorenzo Stoakes
2016-10-07 18:16               ` Hugh Dickins
2016-10-07 18:26                 ` Lorenzo Stoakes
2016-10-10  7:47                 ` Jan Kara
2016-10-10  8:28                   ` Lorenzo Stoakes
2016-10-10 16:37                     ` Jan Kara
2016-09-26  8:19 ` Mel Gorman

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=CA+55aFyL+qFsJpxQufgRKgWeB6Yj0e1oapdu5mdU9_t+zwtBjg@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lstoakes@gmail.com \
    --cc=mgorman@techsingularity.net \
    --cc=riel@redhat.com \
    --cc=robert@ocallahan.org \
    --cc=tbsaunde@tbsaunde.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).