[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] clone syscall fix

From: Stuart Anderson
Subject: Re: [Qemu-devel] [PATCH] clone syscall fix
Date: Sat, 31 Mar 2007 21:52:12 -0400 (EDT)

On Sat, 31 Mar 2007, Thiemo Seufer wrote:

Stuart Anderson wrote:

Even though clone() and fork() are related, they don't seem to be close
enough to allow a single routine to be used to implement both. With this
patch, the LTP tests for clone now pass.

But it still does the same, assuming VM_CLONE is set, except for passing
additional arguments to the host call.

I'm not so sure that the VM_CLONE flag should control wether the new
stack is set up or not. There are tests for newsp == NULL inside that
block anyway. The LTP certainly tests combination for which the
do_fork() code doesn't work.

Passing untranslated regs looks
like a bug to me, I'm unsure about the tls_val.

Hmm, could be, but that's the way it is in the current code. I think
more testing on additional combination sof target &host will be needed.

It may be possible to fold this back into do_fork(), but this just seemed to
be a little bit more straightforward.

Since Linux's fork() is just a specialcase of clone() this should be
done eventually.

I'll try just dropping do_fork completely, and see if this new do_clone()
works for the fork case also. If so, then that effectively folds the
changes back into do_fork(), and more closely resembles that non-emulated
case of fork() being implemnted on top of clone( anyway.


Stuart R. Anderson                               address@hidden
Network & Software Engineering                   http://www.netsweng.com/
1024D/37A79149:                                  0791 D3B8 9A4C 2CDC A31F
                                                 BD03 0A62 E534 37A7 9149

reply via email to

[Prev in Thread] Current Thread [Next in Thread]