From: Greg KH <gregkh@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ian Campbell <ijc@hellion.org.uk>,
linux-kernel@vger.kernel.org, stable@kernel.org,
stable-review@kernel.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Peter Zijlstra <peterz@infradead.org>,
Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [RFC] mlock/stack guard interaction fixup
Date: Sun, 22 Aug 2010 12:04:04 -0700 [thread overview]
Message-ID: <20100822190404.GA12445@suse.de> (raw)
In-Reply-To: <AANLkTi=wWcAg8MdWy4O-0au3m6mH+9xWDOKVCJ_x5G_v@mail.gmail.com>
On Sun, Aug 22, 2010 at 11:21:34AM -0700, Linus Torvalds wrote:
> On Sun, Aug 22, 2010 at 10:25 AM, Greg KH <gregkh@suse.de> wrote:
> >>
> >> Greg, we are talking about:
> >> 0e8e50e20c837eeec8323bba7dcd25fe5479194c mm: make stack guard page logic use vm_prev pointer
> >> 7798330ac8114c731cfab83e634c6ecedaa233d7 mm: make the mlock() stack guard page checks stricter
> >> 297c5eee372478fc32fec5fe8eed711eedb13f3d mm: make the vma list be doubly linked
> >
> > I must be missing something, but aren't these patches just "cleanups"
> > and changing the logic here to be nicer? ?Or do they fix real problems
> > with the previous stack guard stuff?
> >
> > Is it the second one you really need here?
>
> They're all "required" (#2 needs #1, and #3 is a fix for something
> that can happen in the same circumstances that #2 makes any
> difference).
Ok, thanks.
> Although you do need to have some really odd things going on for any
> of them to make any difference. Notably, you need to do mlock or
> mprotect on the stack segment, which no sane program does.
>
> That said, the change from
>
> start += PAGE_SIZE;
>
> to
>
> addr += PAGE_SIZE;
>
> in __mlock_vma_pages_range() (in #3) is a bugfix even for the normal
> mlockall() case. Not that anybody will realistically care about that
> either: the failure case just doesn't really realistically ever matter
> (it expands the stack which the code tries to avoid, and possibly
> forgets to mlock the bottom of the stack).
>
> So I wouldn't call them high priority. Ian is doing something _really_
> odd. Doing hypercalls from user space on stuff that is on the stack,
> rather than just copying it to some stable area is dodgy. And I
> guarantee that doing the crazy mlock dance is slower than the copy, so
> it's complex, fragile, _and_ slow.
Heh, ok, I'll not worry about this for the .27 kernel then, that makes
it a lot easier for me :)
thanks,
greg k-h
next prev parent reply other threads:[~2010-08-22 19:09 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-20 23:59 [RFC] mlock/stack guard interaction fixup Linus Torvalds
2010-08-21 0:20 ` Mike Snitzer
2010-08-21 0:54 ` Linus Torvalds
2010-08-21 11:56 ` Ian Campbell
2010-08-21 15:48 ` Linus Torvalds
2010-08-21 16:08 ` Sam Ravnborg
2010-08-23 16:34 ` Tony Luck
2010-08-22 6:57 ` Ian Campbell
2010-08-22 7:33 ` Ian Campbell
2010-08-22 9:55 ` Ian Campbell
2010-08-22 16:43 ` Linus Torvalds
2010-08-22 17:25 ` Greg KH
2010-08-22 18:21 ` Linus Torvalds
2010-08-22 19:04 ` Greg KH [this message]
2010-08-23 9:22 ` Peter Zijlstra
2010-08-23 15:42 ` ijackson
2010-08-23 16:25 ` Peter Zijlstra
2010-08-23 17:18 ` Ian Jackson
2010-08-23 17:34 ` Linus Torvalds
2010-08-23 17:53 ` Peter Zijlstra
2010-08-23 17:59 ` Peter Zijlstra
2010-08-23 18:43 ` Darren Hart
2010-08-23 18:50 ` Jeremy Fitzhardinge
2010-08-23 19:07 ` Peter Zijlstra
2010-08-23 19:23 ` Jeremy Fitzhardinge
2010-08-23 19:26 ` Peter Zijlstra
2010-08-23 19:54 ` Jeremy Fitzhardinge
2010-08-24 7:08 ` Peter Zijlstra
2010-08-24 7:20 ` Peter Zijlstra
2010-08-23 19:03 ` Ian Campbell
2010-08-23 17:40 ` Peter Zijlstra
2010-08-23 18:53 ` Jeremy Fitzhardinge
2010-08-25 8:28 ` [Stable-review] " Stefan Bader
2010-08-23 9:00 ` Peter Zijlstra
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=20100822190404.GA12445@suse.de \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=ijc@hellion.org.uk \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=stable-review@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