From patchwork Tue Sep 27 12:43:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 12990715 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7653C54EE9 for ; Tue, 27 Sep 2022 14:28:09 +0000 (UTC) Received: from localhost ([::1]:33926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odBZA-0007PW-MW for qemu-devel@archiver.kernel.org; Tue, 27 Sep 2022 10:28:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od9wU-0004Km-12 for qemu-devel@nongnu.org; Tue, 27 Sep 2022 08:44:06 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:58339) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od9wR-0006RM-6U for qemu-devel@nongnu.org; Tue, 27 Sep 2022 08:44:05 -0400 Received: from quad ([82.142.8.70]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MEC8L-1oVhpT48ft-00AD4X; Tue, 27 Sep 2022 14:43:59 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Cc: Laurent Vivier Subject: [PATCH v2 0/2] linux-user: handle /proc/self/exe with execve() syscall Date: Tue, 27 Sep 2022 14:43:55 +0200 Message-Id: <20220927124357.688536-1-laurent@vivier.eu> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.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+VuvwbT0lkc9tAAdRmGFmSrv4klF0FKZ2WrBGR CaOzXbu Received-SPF: none client-ip=212.227.126.131; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Use exec_path to re-execute the binary from /proc/self/exe Fix do_openat() that should not use execfd. v2: - don't use execfd as it can't be closed and is usable by the child Laurent Vivier (2): linux-user: handle /proc/self/exe with execve() syscall linux-user: don't use AT_EXECFD in do_openat() linux-user/syscall.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)