linux/arch/xtensa/kernel
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
..
align.S [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
asm-offsets.c xtensa: Shuffle include statements to fix linker script 2010-05-02 01:05:13 -07:00
coprocessor.S [XTENSA] Add support for configurable registers and coprocessors 2008-02-13 17:41:43 -08:00
entry.S xtensa: add handling of TIF_NOTIFY_RESUME 2012-05-21 23:59:48 -04:00
head.S xtensa: Fixes due to bss boundary symbol name changes. 2010-05-01 23:05:29 -07:00
irq.c xtensa: fix xtensa_irq_unmask calls 2012-10-03 15:11:19 -07:00
Makefile xtensa: adopt generic io routines 2012-10-03 15:11:42 -07:00
module.c modules: make arch's use default loader hooks 2011-07-24 22:06:04 +09:30
pci-dma.c xtensa: add missing symbol exports 2012-10-03 15:12:52 -07:00
pci.c Xtensa patchset for 3.7 2012-10-09 16:11:46 +09:00
platform.c xtensa: change default platform clock frequency to 10MHz 2012-10-03 15:11:59 -07:00
process.c xtensa: copy_thread with CLONE_VM must not copy live parent AR windows 2012-10-15 21:42:27 -07:00
ptrace.c Disintegrate asm/system.h for Xtensa 2012-03-28 18:30:03 +01:00
setup.c xtensa: drop CONFIG_EMBEDDED_RAMDISK 2012-10-03 15:13:09 -07:00
signal.c Uninclude linux/freezer.h 2012-10-01 09:58:18 -04:00
syscall.c ipc: add COMPAT_SHMLBA support 2012-07-30 17:25:20 -07:00
time.c clocksource: xtensa: Convert to clocksource_register_hz/khz 2011-11-21 19:01:04 -08:00
traps.c Disintegrate asm/system.h for Xtensa 2012-03-28 18:30:03 +01:00
vectors.S xtensa: includecheck fix: vectors.S 2010-05-25 08:06:56 -07:00
vmlinux.lds.S xtensa: drop CONFIG_EMBEDDED_RAMDISK 2012-10-03 15:13:09 -07:00
xtensa_ksyms.c xtensa: provide dummy gcc intrinsics 2012-10-03 15:12:56 -07:00