From patchwork Thu Mar 19 09:26:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 11446907 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4382114B4 for ; Thu, 19 Mar 2020 09:27:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2354020753 for ; Thu, 19 Mar 2020 09:27:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2354020753 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jErSg-00079d-9A for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 Mar 2020 05:27:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40870) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jErRv-0005MD-Hj for qemu-devel@nongnu.org; Thu, 19 Mar 2020 05:26:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jErRu-0004D8-H3 for qemu-devel@nongnu.org; Thu, 19 Mar 2020 05:26:47 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:39709) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jErRu-0004Ch-7o for qemu-devel@nongnu.org; Thu, 19 Mar 2020 05:26:46 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MdwRi-1jokQf2xF8-00b143; Thu, 19 Mar 2020 10:26:35 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v3 06/16] linux-user: Add AT_EXECFN auxval Date: Thu, 19 Mar 2020 10:26:17 +0100 Message-Id: <20200319092627.51487-7-laurent@vivier.eu> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200319092627.51487-1-laurent@vivier.eu> References: <20200319092627.51487-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:3xiK71eCnLP9OVwnkNfXqn1RhykFYo0OKb+RbwyTZRLRs+4jXSj zihILX19+8MzJbkP8mKelVuVPlqLFCr6VoP9U6J0QvRndfxpHEZIUnHooZVtuPcU6IZ6bTH yMZMAJLzt1JsnyOF6Kmj0dm8JprQRQkiqLJKPWDzHLaQKQXFyN04bo8fNk10WJ0jJOPw2so rPq+OZqnBlIBbvMif9zvA== X-UI-Out-Filterresults: notjunk:1;V03:K0:WsIW9bez7L4=:DocxGW5Ac1Z5JsB5KUTcoz ld4AjfpMESzpi7bf2GikzEWH+GYeHwT0bSHykI9DvTrLusoVK0pMtnV6OhXTuxa/XMGGjixzG /6sDFZiiLbIL+NoU6K/w48oYuFFlRDKN7GTeNp6/ku8o80VXrB+GwmDltjqZhyYRgKYREOhyP MCVyysUwfVJjN7kg38RN+0Z2vuYYZoOifAPZA/crPy0LZ1VLcJ24PXm+0Cg6dauwxRv49PjrY R6lvKC5AzZIof6GYkSXm89t/RfVRKTeXM6Hsg+ylmviC/E5wjY5UrZQNX97+kWPmHKd/TJlur JdEK2Q9Oca8Tn+2mJ/cHjXgbS54ed7aREwlwlAsaEnAEoxFOGk3ywZxQKnqQq8m8ZYsIHONfP WU5IX8w4zmv5j2bbTBqws//s2OpB6933ahQ4lAgsUbGSJpi73Cuv0afw+nH/j+ZQzfow1KOcz Vd+tg5r8PlRYlfJx5x+b1hT18wRh3fa0nfAiGyv/6vgErrHSbX9IZXlnEpwqnVM+Fn+unerVL ApYsdofO0Lh8HtAqt8Gag86dBM9f13rHIpENP4Ez0w+oxknOOv4UbK2hQMsSw/GwGgNmBfZL3 wTRxAIJC93G4h2RcFO8sAf6kYnfKMADqpNjWE3tDnIFqPqS0SthrucOtN9fQow9O7/eswi4FF VnM8145VOOD1+OQ/6sNiT0/tGPSiOO3cL1Xuz/f3ce5dYiDwX8lPw10InYdxIhgaabwavDhld Vec0D3bzB9c+ocPGCrnxxldIc3UdEgwzxsScPbLqvmIqD34TZg/j/73bkEakU/vzbI8rviSo/ jxJRbW4xmtcb34S9dGcn9thkjegWdPyZKRz14YzFHZ/pfLBzMA/3PdjCgRDskGdgp7lMuY4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.134 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier , Lirong Yuan Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Lirong Yuan This change adds the support for AT_EXECFN auxval. Signed-off-by: Lirong Yuan Reviewed-by: Laurent Vivier Message-Id: <20200302193153.66415-1-yuanzi@google.com> Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index db748c58775f..8198be044604 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1573,7 +1573,7 @@ struct exec ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1)) #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1)) -#define DLINFO_ITEMS 15 +#define DLINFO_ITEMS 16 static inline void memcpy_fromfs(void * to, const void * from, unsigned long n) { @@ -2037,6 +2037,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc, NEW_AUX_ENT(AT_CLKTCK, (abi_ulong) sysconf(_SC_CLK_TCK)); NEW_AUX_ENT(AT_RANDOM, (abi_ulong) u_rand_bytes); NEW_AUX_ENT(AT_SECURE, (abi_ulong) qemu_getauxval(AT_SECURE)); + NEW_AUX_ENT(AT_EXECFN, info->file_string); #ifdef ELF_HWCAP2 NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);