linux/arch/xtensa
Marc Gauthier 84ed30538b xtensa: copy_thread with CLONE_VM must not copy live parent AR windows
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>
2012-10-15 21:42:27 -07:00
..
boot xtensa: drop CONFIG_EMBEDDED_RAMDISK 2012-10-03 15:13:09 -07:00
configs xtensa: drop CONFIG_EMBEDDED_RAMDISK 2012-10-03 15:13:09 -07:00
include Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
kernel xtensa: copy_thread with CLONE_VM must not copy live parent AR windows 2012-10-15 21:42:27 -07:00
lib xtensa: fix memmove(), bcopy(), and memcpy(). 2012-10-15 21:41:19 -07:00
mm readahead: fault retry breaks mmap file read random detection 2012-10-09 16:22:47 +09:00
platforms xtensa: ISS: fix rs_put_char 2012-10-15 21:39:20 -07:00
variants xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer 2012-05-17 22:47:41 +02:00
Kconfig Xtensa patchset for 3.7 2012-10-09 16:11:46 +09:00
Kconfig.debug
Makefile xtensa: Setup CROSS_COMPILE at the top 2012-10-04 12:16:20 -07:00