Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 24 Aug 2010 15:23:52 -0700 | Subject | Re: [PATCH] hide guard page for stacks that grow upwards |
| |
On Tue, Aug 24, 2010 at 3:03 PM, Luck, Tony <tony.luck@intel.com> wrote: > > This looks useful too ... but I can't see where the code is that > made vm_start be PAGE_SIZE lower to begin with. I'd expect to have > to make a matching change to make vm_end PAGE_SIZE higher for the > VM_GROWSUP areas.
That's the fault path - the very check_stack_guard_page() logic itself.
In other words, nowhere do we _explicitly_ make the stack larger by one page, but nowhere do we explicitly size the stack in the first place! The stack grows by being populated, and every time a new page is populated, check_stack_guard_page() will have expanded the stack vma by one extra page.
Linus
| |