forked from Minki/linux
84ed30538b
When doing a fork (new VM), the new task has a mirror image of the parent's stack, so keeps the same live register windows etc. However when doing a clone with CLONE_VM, keeping the same VM (eg. when creating a new thread), the child starts afresh on a new stack -- it cannot share any part of the parent stack. It especially cannot have the same live AR windows as the parent, otherwise it will overwrite the parent stack on overflow, likely causing corruption. (and so it did...) Effectively, the register windows need to be spilled. Turns out it's much easier to simply not copy parent register windows when CLONE_VM is set. Signed-off-by: Marc Gauthier <marc@tensilica.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net> |
||
---|---|---|
.. | ||
align.S | ||
asm-offsets.c | ||
coprocessor.S | ||
entry.S | ||
head.S | ||
irq.c | ||
Makefile | ||
module.c | ||
pci-dma.c | ||
pci.c | ||
platform.c | ||
process.c | ||
ptrace.c | ||
setup.c | ||
signal.c | ||
syscall.c | ||
time.c | ||
traps.c | ||
vectors.S | ||
vmlinux.lds.S | ||
xtensa_ksyms.c |