plan9fox/sys/src/9/mtx
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
..
clock.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
cycintr.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
dat.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
devarch.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
devether.c change definition of Chan.create to return a chan like open 2011-08-17 23:27:31 +02:00
devrtc.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
ether2114x.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
etherif.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
fns.h segdesc: add /dev/^(ldt gdt) support 2011-07-12 15:46:22 +02:00
i8259.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
inb.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
initcode Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
io.h Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
l.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
main.c kernel: fix wrong calculation of swap iolist size 2011-12-14 00:10:33 +01:00
mem.h sysexec: fix possible segment overlap with temporary stack 2013-03-16 02:37:07 +01:00
mkfile kernel: move duplicated random.c to port 2012-05-03 08:49:25 +02:00
mmu.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mtx Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mtxcpu Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
pci.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
raven.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
trap.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
uarti8250.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00