summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMarc Gauthier <marc@tensilica.com>2012-10-15 03:55:35 +0400
committerChris Zankel <chris@zankel.net>2012-10-15 21:42:27 -0700
commit84ed30538b5d9a29a9612b93dd0a45d561624f82 (patch)
treeb1f0001a732c3518076b8d63cbfe0081f80dafb4 /firmware
parenteae8a416afe140df4b054c448476654db0d46bde (diff)
downloadop-kernel-dev-84ed30538b5d9a29a9612b93dd0a45d561624f82.zip
op-kernel-dev-84ed30538b5d9a29a9612b93dd0a45d561624f82.tar.gz
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>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud