qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] linux-user: implement pipe2 syscall


From: Riku Voipio
Subject: Re: [Qemu-devel] [PATCH] linux-user: implement pipe2 syscall
Date: Wed, 6 May 2009 15:02:56 +0300
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, May 06, 2009 at 12:08:32PM +0100, Jamie Lokier wrote:
> But it's not a bug to call execve(), or fork() then execve(), in
> another thread at the same time as descriptors are being created.
> Those calls scan the whole file descriptor table, and look at the
> FD_CLOEXEC flags.

Now this discussion would be much more useful if qemu was actually
properly threadsafe to begin with...

> I haven't looked too closely at how guest file descriptors are handled
> in QEMU these days.  In an older version I'm looking at, guest file
> descriptors are simply host file descriptors so the pipe2 emulation is
> broken in this way.

> If QEMU maintained a guest file descriptor table internally, emulating
> what a kernel does, this would be solved automatically, but it doesn't.

> You can solve it quite simply for any host kernel with the lock
> solution I just posted in another mail on this thread.  The same
> method works for all the other syscalls taking *_CLOEXEC flags, so
> it's probably a good idea :-)

Either of these suggested changes are separate new features, and
would thus need to be implemented as separate patches. Thanks
for patches in advance :-)




reply via email to

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