overcq <[email protected]> wrote: > Theo de Raadt <[email protected]> wrote: > > > There would need to be justification for why that program wants to do > > that, before changing this. The restriction for stacks is a bit like > > a safety belt. > > I don't know how much stack each task will need, and I reserve all tasks > equally from all available memory. When a new task is created, > I take away the top of the stack from everyone else, so that again > all tasks have the same amount of the stack reserved. But I allocate > real memory only after the task reaches for this memory. > > Perhaps the solution is not to change this protection, as it is only > a matter of ensuring that real memory is not allocated before it is used
That is not making any sense to me. The mmap calls do not allocate memory. Instead, mmap allocates address space, indicating a allocation/permission policy, which allows the kernel to fault in (provide) memory when required. A page of memory in the range is not actually allocated from the system until code touches it.

