linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Hugh Dickins <hughd@google.com>, Dave Jones <davej@redhat.com>,
	Cyrill Gorcunov <gorcunov@gmail.com>,
	Sasha Levin <sasha.levin@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Bob Liu <bob.liu@oracle.com>,
	Konstantin Khlebnikov <koct9i@gmail.com>
Subject: Re: bad rss-counter message in 3.14rc5
Date: Tue, 18 Mar 2014 19:37:01 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.11.1403181928370.3499@eggly.anvils> (raw)
In-Reply-To: <CA+55aFxVG7HLmsvCzoiA7PBRPvX3utRfyVGrBs6gVLZ-fUCuPQ@mail.gmail.com>

On Tue, 18 Mar 2014, Linus Torvalds wrote:
> On Tue, Mar 18, 2014 at 7:06 PM, Hugh Dickins <hughd@google.com> wrote:
> >
> > I'd love that, if we can get away with it now: depends very
> > much on whether we then turn out to break userspace or not.
> 
> Right. I suspect we can, though, but it's one of those "we can try it
> and see". Remind me early in the 3.15 merge window, and we can just
> turn the "force" case into an error case and see if anybody hollers.

Super, I'll do that, thanks.

For 3.15, and probably 3.16 too, we should keep in place whatever
partial accommodations we have for the case (such as allowing for
anon and swap in fremap's zap_pte), in case we do need to revert;
but clean those away later on.  (Not many, I think: it was mainly
a guilty secret that VM accounting didn't really hold together.)

> 
> > If I remember correctly, it's been that way since early days,
> > in case ptrace were used to put a breakpoint into a MAP_SHARED
> > mapping of an executable: to prevent that modification from
> > reaching the file, if the file happened to be opened O_RDWR.
> > Usually it's not open for writing, and mapped MAP_PRIVATE anyway.
> 
> Yes, it's been that way since the very beginning, I think it goes back
> pretty much as far as MAP_SHARED does.
> 
> We used to play lots of games wrt MAP_SHARED - in fact I think we used
> to silently turn a MAP_SHARED RO mapping into MAP_PRIVATE because for
> the longest time there was no "true" writable MAP_SHARED at all, but
> we did have a coherent MAP_PRIVATE and something like the indexer for
> nntpd wanted a read-only shared mapping of the nntp spool or something
> like that. I forget the details, it's a _loong_ time ago.
> 
> So the whole "force turns a MAP_SHARED page into MAP_PRIVATE" all used
> to make a lot more sense in that kind of situation, when MAP_SHARED vs
> MAP_PRIVATE was much less of a black-and-white thing.
> 
> I really suspect nobody cares wrt ptrace, especially since presumably
> other systems haven't had those kinds of games (although who knows -
> HP-UX in particular had some of the shittiest mmap() implementations
> on the planet - it made even the original Linux mmap hacks look like a
> thing of pure beauty in comparison).

:)  That fits with what I heard of HP-UX mmap,
but I never had the pleasure of dealing with it.

Hugh

--
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:[~2014-03-19  2:38 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 17:45 Dave Jones
2014-03-05 17:57 ` Dave Jones
2014-03-07  0:22   ` Dave Jones
2014-03-11  2:49     ` Dave Jones
2014-03-11  3:13       ` Andrew Morton
2014-03-11  4:46         ` Andrew Morton
2014-03-11  4:50           ` Dave Jones
2014-03-11  4:51           ` Dave Jones
2014-03-11  5:01             ` Andrew Morton
2014-03-11  5:07               ` Dave Jones
2014-03-11  5:30               ` Dave Jones
2014-03-11 12:55                 ` Sasha Levin
2014-03-11 13:20                 ` Cyrill Gorcunov
2014-03-11 13:23                   ` Sasha Levin
2014-03-11 13:41                     ` Cyrill Gorcunov
2014-03-11 14:28                       ` Dave Jones
2014-03-11 14:37                         ` Cyrill Gorcunov
2014-03-11 14:58                           ` Sasha Levin
2014-03-11 17:10                           ` Dave Jones
2014-03-11 17:36                             ` Cyrill Gorcunov
2014-03-11 17:39                               ` Dave Jones
2014-03-14 12:27                                 ` Cyrill Gorcunov
2014-03-19  0:38                                 ` Hugh Dickins
2014-03-19  1:10                                   ` Linus Torvalds
2014-03-19  2:06                                     ` Hugh Dickins
2014-03-19  2:24                                       ` Linus Torvalds
2014-03-19  2:37                                         ` Hugh Dickins [this message]
2014-03-19  2:57                                           ` Linus Torvalds
2014-03-19 11:04                                           ` Jan Kara
2014-03-19  1:32                                   ` Sasha Levin
2014-03-19  2:06                                     ` Dave Jones
2014-03-19  2:11                                       ` Dave Jones
2014-03-19  2:19                                         ` Hugh Dickins
2014-03-19 14:52                                           ` Dave Jones
2014-03-20  5:00                                             ` Hugh Dickins
2014-03-20 13:51                                               ` Dave Jones
2014-03-20 14:19                                                 ` Sasha Levin
2014-03-21  4:46                                                   ` Hugh Dickins
2014-03-19  2:12                                     ` Hugh Dickins
2014-03-19  2:42                                       ` Sasha Levin
2014-03-19 12:04                                   ` Cyrill Gorcunov

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=alpine.LSU.2.11.1403181928370.3499@eggly.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=bob.liu@oracle.com \
    --cc=davej@redhat.com \
    --cc=gorcunov@gmail.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=koct9i@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sasha.levin@oracle.com \
    --cc=torvalds@linux-foundation.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