]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Part 2 of implementing rstacks: add the ability to create rstacks and
authormarcel <marcel@FreeBSD.org>
Sat, 27 Sep 2003 22:28:14 +0000 (22:28 +0000)
committermarcel <marcel@FreeBSD.org>
Sat, 27 Sep 2003 22:28:14 +0000 (22:28 +0000)
commitd75cf983076733a922bb61d7b8d2683e3200de71
treeca87952e7714e85716c318c18850085a80633493
parent9d6689c4a78aa15eeea04d8fc8d55500ebf7b56c
Part 2 of implementing rstacks: add the ability to create rstacks and
use the ability on ia64 to map the register stack. The orientation of
the stack (i.e. its grow direction) is passed to vm_map_stack() in the
overloaded cow argument. Since the grow direction is represented by
bits, it is possible and allowed to create bi-directional stacks.
This is not an advertised feature, more of a side-effect.

Fix a bug in vm_map_growstack() that's specific to rstacks and which
we could only find by having the ability to create rstacks: when
the mapped stack ends at the faulting address, we have not actually
mapped the faulting address. we need to include or cover the faulting
address.

Note that at this time mmap(2) has not been extended to allow the
creation of rstacks by processes. If such a need arises, this can
be done.

Tested on: alpha, i386, ia64, sparc64
sys/kern/kern_exec.c
sys/vm/vm_map.c
sys/vm/vm_map.h
sys/vm/vm_mmap.c