Received: from eggs.gnu.org ([2001:4830:134:3::10]:35186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVcjm-0004hx-M0 for qemu-devel@nongnu.org; Thu, 03 Apr 2014 04:11:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVcjh-0004q6-ES for qemu-devel@nongnu.org; Thu, 03 Apr 2014 04:11:02 -0400 Received: from indium.canonical.com ([91.189.90.7]:46210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVcjh-0004og-9P for qemu-devel@nongnu.org; Thu, 03 Apr 2014 04:10:57 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1WVcjg-00046g-Km for ; Thu, 03 Apr 2014 08:10:56 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 95E172E8085 for ; Thu, 3 Apr 2014 08:10:56 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Apr 2014 08:04:17 -0000 From: Peter Maydell Sender: bounces@canonical.com References: <20140328194935.9822.78832.malonedeb@soybean.canonical.com> Message-Id: <20140403080417.9081.56955.malone@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1299190] Re: Access to /proc/self/exe in linux-user mode Reply-To: Bug 1299190 <1299190@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Some nits: The "(CPUArchState *)" cast isn't necessary We should use exec_path, not ts->bprm->argv[0] (the guest argv[0] isn't ne= cessarily the executable path) We don't want to call path() here -- exec_path is a host path, and only gu= est filename paths need to go through path(). Looking a little more closely at the logic in main.c I wonder if we actually want: if (is_proc_myself(pathname, "exe")) { execfd =3D qemu_getauxval(AT_EXECFD); if (execfd) { return execfd; } return get_errno(open(exec_path, flags, mode)); } Also if you'd like us to apply your patches we'll need at least a "Signed-off-by: " line from you. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1299190 Title: Access to /proc/self/exe in linux-user mode Status in QEMU: New Bug description: This is based on a recent bug in GCC Bugzilla: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60681 It looks like libbacktrace (GCC runtime library used for obtaining stack traces) uses /proc/self/exe for error reporting. Currently this is mapped to qemu-arm which effectively disables libbacktrace on linux-user. It seems that QEMU already supports /proc/self/{maps,stat,auxv} so addition of /proc/self/exe may be trivial. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1299190/+subscriptions