managing stacks
Norman Feske
norman.feske at ...1...
Mon Aug 18 15:28:18 CEST 2008
Hi Neal,
Neal H. Walfield wrote:
> At Thu, 14 Aug 2008 20:23:18 +0200,
> Norman Feske wrote:
>> Julian Stecklina wrote:
>>> Is it possible to use a guard page to detect stack overflow? Having a
>>> way to implement guard pages using Bastei primitives would be nice for
>>> some other projects I have in mind.
>> Our current plan is to use a dedicated area of the virtual address
>> space to locate the stacks
>
> Why are you special casing stacks? Isn't using something like mmap
> enough?
Sorry, maybe my explanation was a bit misleading. The mechanism
is based on something like mmap (we attach a dataspace to the
region map of the process). The addition I mentioned was the
signalling mechanism that is missing right now. Regarding the
stack allocation, I was just suggesting a user-level policy of
where to place stacks within the processes address space. Just
for clarity and debugging, it would be nice to have a convention,
for example: all stack live in the area 0x40000000 to 0x80000000,
each having a maxumum size of 0x100000. When I spoke of dynamically
growing stacks, I meant growth only within the bound of 0x100000
minus one page (as a guard). I agree that relocating stacks during
the lifetime of a thread sounds like an awkward idea ;-)
--
Norman Feske
Genode Labs
http://www.genode-labs.com ยท http://genode.org
More information about the users
mailing list