From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6jWO-0007cI-Vf for qemu-devel@nongnu.org; Mon, 14 Jul 2014 12:54:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6jWI-0000au-35 for qemu-devel@nongnu.org; Mon, 14 Jul 2014 12:54:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45676 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6jWH-0000aK-TK for qemu-devel@nongnu.org; Mon, 14 Jul 2014 12:54:30 -0400 Message-ID: <53C40B43.402@suse.de> Date: Mon, 14 Jul 2014 18:54:27 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1405348708-13909-1-git-send-email-Joakim.Tjernlund@transmode.se> <53C3F57D.4080509@suse.de> <53C3FB4A.3050007@suse.de> <53C3FEA3.2060605@suse.de> <53C4069A.4050107@suse.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] linux-user: Add binfmt wrapper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Joakim Tjernlund Cc: riku.voipio@iki.fi, qemu-devel@nongnu.org On 14.07.14 18:51, Joakim Tjernlund wrote: > Alexander Graf wrote on 2014/07/14 18:34:34: >> >> On 14.07.14 18:32, Joakim Tjernlund wrote: >>> Alexander Graf wrote on 2014/07/14 18:00:35: >>> You think everyone feel OK with new defaults like OP ? >>>> Yes. >>> hmm, with current qemu it works to boot a LXC with just O flag. >>> Why would we then want to complicate things by adding OP which >>> then requires some version of my patch? >> How does current QEMU boot anything with the 0 flag? It doesn't know how >> to handle it and will misinterpret the argument, no? > Playing some, one could possibly do both: > > - if (i > 0 && strcmp(binfmt, "-binfmt-wrapper") == 0) { > + execfd = qemu_getauxval(AT_EXECFD); > + if (execfd > 0 || i > 0 && strcmp(binfmt, "-binfmt-wrapper") == 0) { 0 is a valid fd :). And yes, this would work, but I don't see why we should introduce the -binfmt-wrapper logic to upstream QEMU. It's never been there. And the AT_EXECFD evaluation is a lot cleaner. While we're at it - should we also pass the C flag to binfmt_misc? Alex