From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XONLX-00014I-06 for qemu-devel@nongnu.org; Mon, 01 Sep 2014 04:52:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XONLQ-0007d6-SR for qemu-devel@nongnu.org; Mon, 01 Sep 2014 04:52:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XONLQ-0007cw-Kt for qemu-devel@nongnu.org; Mon, 01 Sep 2014 04:52:12 -0400 Message-ID: <540433A8.5040509@redhat.com> Date: Mon, 01 Sep 2014 10:51:52 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20140825090917.GA14835@afflict.kos.to> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] linux-user: enabling binfmt P flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Riku Voipio Cc: Alexander Graf , Cole Robinson , Michael Tokarev , QEMU Developers , Joakim Tjernlund Il 29/08/2014 20:01, Peter Maydell ha scritto: > [cc'ing MJT for more distro opinion since I think fundamentally > the choice we ought to make upstream is "what's not going to > screw over distros"... Paolo, is there a RedHat QEMU maintainer > who would have an opinion here?] There's Cole Robinson. BTW, Fedora doesn't use the binfmt scripts from QEMU, but does reuse the binfmt lines. We'd just add Ps and we'd be fine. However, the problem is not really for distros. Packagers just read the release notes and adjust whatever needs to be adjusted. The problem is for people who compile from source and are bit by conflicting binfmt formats from their distro. The solution could be to extend binfmt_misc so that it sets two environment variables BINFMT_MISC_PID and BINFMT_MISC_ORIG_ARGV0. The former is set to the pid of the binfmt "interpreter" program, the latter to the argv[0] value. Then QEMU can check if BINFMT_MISC_PID matches getpid() and, if so, trust the BINFMT_MISC_ORIG_ARGV0 value. Paolo