From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 7DFFD5A005E for ; Thu, 17 Nov 2022 15:13:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668694392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AYuaUtlIm9kxv/MMnoiDXI0Tt4Jy7PGXp3nw8SSgotQ=; b=awDXpgXgJOY1NwGT5kFQSU4HmxGFxoSJWzd9fYA63rzZQrCkT1Oh6V98ipLSWlDiti7hPq 1u0DSS7qbMyzUg6ZRyWjbttGCX3kIE40DosA+feGiph0NK57fUYlfaIXxwg4xFLN2MfjxK 6x8HruMQG1ZYyvRGEedIZNOWk5aOeEk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-9-pO-PUdsgNEuz5iIgshtFow-1; Thu, 17 Nov 2022 09:13:10 -0500 X-MC-Unique: pO-PUdsgNEuz5iIgshtFow-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6192F3C0D193 for ; Thu, 17 Nov 2022 14:13:10 +0000 (UTC) Received: from localhost (unknown [10.39.193.198]) by smtp.corp.redhat.com (Postfix) with ESMTP id 05DDB49BB60; Thu, 17 Nov 2022 14:13:09 +0000 (UTC) Date: Thu, 17 Nov 2022 14:13:07 +0000 From: "Richard W.M. Jones" To: Stefano Brivio Subject: Re: [PATCH passt 0/5] Add fuzzing Message-ID: <20221117141307.GD7636@redhat.com> References: <20221117122614.1269214-1-rjones@redhat.com> <20221117145857.6122d941@elisabeth> MIME-Version: 1.0 In-Reply-To: <20221117145857.6122d941@elisabeth> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID-Hash: PHDYVKN6LB6FTJ2BNVJXU3NJPNHRKS2D X-Message-ID-Hash: PHDYVKN6LB6FTJ2BNVJXU3NJPNHRKS2D X-MailFrom: rjones@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, Nov 17, 2022 at 02:58:57PM +0100, Stefano Brivio wrote: > On Thu, 17 Nov 2022 12:26:09 +0000 > "Richard W.M. Jones" wrote: > > > Unfortunately I don't think the --fd option is working. stracing the > > code shows the socket being added to the epoll, but it somehow never > > gets read. It might be something obvious but I couldn't see what was > > wrong. (NB: The socket passed in is *connected* already). > > I'm looking into this (right now just for something obvious, if > nothing pops up, a bit later) but actually I wonder: couldn't qemu() > from 5/5 just call socket(AF_UNIX, SOCK_STREAM, 0) and connect() on it? > Or am I missing something? We could create a temporary socket in the filesystem. --fd avoids the overhead of having to connect on one side and listen/accept on the other side, and having something in the filesystem which needs to be cleaned up. (Linux has the anonymous namespace which avoids cleanup but not the rest). > Then sure, as you mentioned, this could be useful for something else, > so it's probably worth it to get it working. Right - we have spent a lot of time adding fd passing to qemu, nbdkit & libnbd just because it's generally useful. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org