It would certainly be worth at least testing that as an approach.
Another thing we could decide to do is to just check the size of the stack
that is left at the end of all the stack setup code, and just say "if it's
less than X bytes, just return ENOMEM rather than set up a process with a
really unusably small stack".
Linus
--