From: Nick Piggin <npiggin@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Duane Griffin <duaneg@dghda.com>,
linux-kernel Mailing List <linux-kernel@vger.kernel.org>,
stable@kernel.org, Hugh Dickins <hugh@veritas.com>
Subject: Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
Date: Fri, 2 Nov 2007 00:56:44 +0100 [thread overview]
Message-ID: <20071101235644.GA20144@wotan.suse.de> (raw)
In-Reply-To: <alpine.LFD.0.999.0711010901290.3342@woody.linux-foundation.org>
On Thu, Nov 01, 2007 at 09:08:45AM -0700, Linus Torvalds wrote:
>
>
> On Thu, 1 Nov 2007, Nick Piggin wrote:
> >
> > Untested patch follows
>
> Ok, this looks ok.
>
> Except I would remove the VM_MAYSHARE bit from the test.
But we do want to allow forced COW faults for MAP_PRIVATE mappings. gdb
uses this for inserting breakpoints (but fortunately, a COW page in a
MAP_PRIVATE mapping is a much more natural thing for the VM).
> That whole bit should go, in fact.
>
> We used to make it something different: iirc, a read-only SHARED mapping
> was downgraded to a non-shared mapping, because we wanted to avoid some of
> the costs we used to have with the VM implementation (actually, I think it
> was various filesystems that don't like shared mappings because they don't
> have a per-page writeback). But we left the VM_MAYSHARE bit on, to get
> /proc/<pid>/mmap things right.
>
> Or something like that. I forget the details. But I *think* we don't
> actually need this any more.
>
> But basically, the "right" way to test for shared mappings is historically
> to just test the VM_MAYSHARE bit - but not *both* bits. Because VM_SHARE
> may have been artificially cleared.
I think you're right -- VM_MAYSHARE is basically testing for MAP_SHARED.
I just don't know exactly what you're proposing here.
Thanks,
Nick
next prev parent reply other threads:[~2007-11-01 23:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 0:45 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning Duane Griffin
2007-10-31 4:19 ` Nick Piggin
2007-10-31 10:27 ` Duane Griffin
2007-10-31 15:11 ` Linus Torvalds
2007-10-31 15:19 ` Nick Piggin
2007-10-31 15:59 ` Linus Torvalds
2007-10-31 17:19 ` Duane Griffin
2007-10-31 22:55 ` Nick Piggin
2007-10-31 23:08 ` Linus Torvalds
2007-11-01 2:37 ` Nick Piggin
2007-11-01 15:14 ` Linus Torvalds
2007-11-01 15:47 ` Nick Piggin
2007-11-01 16:08 ` Linus Torvalds
2007-11-01 23:56 ` Nick Piggin [this message]
2007-11-02 1:17 ` Linus Torvalds
2007-11-02 6:30 ` Nick Piggin
2007-10-31 6:42 ` Nick Piggin
2007-10-31 6:56 ` David Miller
2007-10-31 7:41 ` Nick Piggin
2007-10-31 7:44 ` David Miller
2007-11-02 5:02 ` David Miller
2007-11-02 10:45 ` Nick Piggin
2007-11-02 15:36 ` Ingo Molnar
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=20071101235644.GA20144@wotan.suse.de \
--to=npiggin@suse.de \
--cc=duaneg@dghda.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--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