[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <987664A83D2D224EAE907B061CE93D53015D8130ED@orsmsx505.amr.corp.intel.com>
Date: Tue, 24 Aug 2010 10:33:02 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-parisc@...r.kernel.org" <linux-parisc@...r.kernel.org>,
"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>
Subject: RE: [PATCH] guard page for stacks that grow upwards
> But the ia64 grows-up case is tested?
Yes. The attached hacky test program reports that the RSE stack
stomps over the mmap'd segment w/o this patch. With it the
program dies with a SIGBUS. Should be easy to adapt to
test on pa-risc (hint, hint to parisc people).
>> The #ifdefs are ugly - suggestions welcome on how to make
>> the code prettier.
>
> One thing I've considered is to get rid of the CONFIG_STACK_GROWSUP
> crap entirely in code, and instead just make the VM_GROWSUP #define be
> 0 for architectures that don't want it. The compiler should then just
> automatically remove all the code that says
>
> if (vma->vm_flags & VM_GROWSUP) {
> ...
>
> and the code would look more straightforward. Hmm?
You'd also need some stub declaration for expand_upwards().
But overall that would look cleaner.
-Tony
View attachment "growtest.c" of type "text/plain" (771 bytes)
Powered by blists - more mailing lists