plan9fox/sys
cinap_lenrek f37465fd7f sysexec: fix possible segment overlap with temporary stack
the kernel uses fixed area (TSTKTOP, TSTKSIZ) of the address
space to temporarily map the new stack segment for exec. for
386 and arm, this area was right below the stack segment which
has the problem that the program can map arbitrary segments
there (even readonly).

alpha and ppc dont have this problem as they map the temporary
exec stack *above* the user reachable stack segement and segattach
prevents one from mapping anything above or overlaping the stack.

lots of arch code assumes USTKTOP being the end of userspace
address space and changing this to TSTKTOP would work, but results
in lots of hard to test changes.

instead, we'r going to map the temporary stack programmatically
finding a hole in the address space where to map it. we also lift
the size limitation for arguments and allow arguments to fill
the whole new stack segement.

the TSTKTOP and TSTKSIZ are not used anymore so they where removed.

references:

http://9fans.net/archive/2013/03/203
http://9fans.net/archive/2013/03/202
http://9fans.net/archive/2013/03/197
http://9fans.net/archive/2013/03/195
http://9fans.net/archive/2013/03/181
2013-03-16 02:37:07 +01:00
..
doc
games/lib fortunes: He wasn't asking about plan9port. 2013-03-07 18:34:35 -05:00
include ape: threadsafe errno 2013-03-11 18:57:22 +01:00
lib dont use full qualified domain names in example configuration 2013-02-27 08:18:18 +01:00
man wpa(8): fix typos 2013-03-10 19:25:01 -04:00
src sysexec: fix possible segment overlap with temporary stack 2013-03-16 02:37:07 +01:00