All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Mohring <martin.mohring@opensuse.org>
To: Jamie Lokier <jamie@shareable.org>
Cc: Riku Voipio <riku.voipio@iki.fi>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: implement pipe2 syscall
Date: Wed, 06 May 2009 14:46:33 +0200	[thread overview]
Message-ID: <4A0186A9.3080902@opensuse.org> (raw)
In-Reply-To: <20090506120256.GA21149@kos.to>

Riku Voipio wrote:
> 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 :-)
>   
What do we now discuss? A reimplementation of a complete threadsafe user
mode for qemu now? I dont think that this is the scope of the two
patches. What do the architects of user mode say about that? I thought
we have even the problem of a missing qemu user mode Maintainer?

      parent reply	other threads:[~2009-05-06 12:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05 13:30 [Qemu-devel] [PATCH] linux-user: implement pipe2 syscall Riku Voipio
2009-05-05 20:43 ` [Qemu-devel] [PATCH] linux-user: implement pipe2 syscall [v2] Riku Voipio
2009-05-05 22:58 ` [Qemu-devel] [PATCH] linux-user: implement pipe2 syscall Jamie Lokier
2009-05-06  8:00   ` Riku Voipio
2009-05-06  9:18     ` Martin Mohring
2009-05-06 10:53       ` Jamie Lokier
2009-05-06 11:02       ` Riku Voipio
2009-05-06 11:08     ` Jamie Lokier
2009-05-06 12:02       ` Riku Voipio
2009-05-06 12:23         ` Paul Brook
2009-05-06 14:26           ` Riku Voipio
2009-05-06 12:46         ` Martin Mohring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A0186A9.3080902@opensuse.org \
    --to=martin.mohring@opensuse.org \
    --cc=jamie@shareable.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.