Re: expand_stack fix [was Re: 2.4.9aa3]

From: Andrea Arcangeli (andrea@suse.de)
Date: Sat Sep 08 2001 - 22:50:38 EST


On Sat, Sep 08, 2001 at 11:23:38PM -0500, Jeff Dike wrote:
> andrea@suse.de said:
> > My fix for the race doesn't drop the usability of GROWSDOWN that could
> > otherwise break userspace programs. I guess at least uml uses
> > growsdown vma file backed. Jeff?
>
> No. In neither the host kernel or UML is there a vma that's file backed and
> growsdown.
>
> UML process stacks are marked growsdown in UML and are file backed on the host,
> but that's not the same thing.

ok, so I guess you're doing the growsdown by hand in the uml sigsegv
handler.

So it's probably fine to allow GROWSDOWN only on anon vmas per Linus's
suggestion. I can attempt to change the race fix that way.

However about last Linus's suggestion it's not obvious to me that
dropping GROWSDOWN/UP completly and forcing a fixed virtual size of the
stack [modulo rlimit of course] is a good idea, because:

1) on 32bit platforms having big vma for the stack means reducing the
   space for the dynamic mappings
2) I love not to have a virtual stack limit for software making use of
   aggressive recursion.

The gap logic is very simple too.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 15 2001 - 21:00:16 EST