Re: [PATCH 11/11][v15]: Document sys_eclone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/06/2010 08:12 AM, Oren Laadan wrote:
>>
>> The child returns from vfork, via the same return address that
>> the parent will later use. (on the stack for many architectures)
>> The child then calls a function which might not have the same
>> stack layout as vfork, scrambling whatever may be on the stack
>> that the parent will be using to return from vfork. The parent may
>> then end up using a return address that has been corrupted.
>> To make this work, gcc actually recognizes vfork and has
>> special handling for it.
> 
> I assumed that this is taken care of by libc rather than the
> compiler, like it is done for clone(2).
> 

No, vfork is *really* special, because the two threads share a stack.

	-hpa

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux