[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=+vwP0kWYKdvVbhSTznfRvHozLmL4YOb=ew=FY@mail.gmail.com>
Date: Fri, 20 Aug 2010 09:49:40 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ian Campbell <ijc@...lion.org.uk>
Cc: linux-kernel@...r.kernel.org, stable@...nel.org,
stable-review@...nel.org, akpm@...ux-foundation.org,
alan@...rguk.ukuu.org.uk, Greg KH <gregkh@...e.de>,
Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [2/3] mm: fix up some user-visible effects of the stack guard page
On Fri, Aug 20, 2010 at 9:35 AM, Ian Campbell <ijc@...lion.org.uk> wrote:
>
> On the other hand the VMA merging is just an optimisation, isn't it?
Well, yes and no. This would make it have semantic differences, if you
were to unmap the lower part of the stack.
I could imagine some crazy program wanting to basically return the
stack pages to the system after doing heavy recursion. IOW, they could
do
- use lots of stack because we're recursing 1000 levels deep
- know that we used lots of stack, so after returning do something like
stack = &local variable;
align stack down by two pages
munmap down from there to give memory back
and now it really would be a semantic change where the VM_GROWSDOWN
bit has literally disappeared.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists