From patchwork Thu Jul 2 15:26:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 278828 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A5F4C433E0 for ; Thu, 2 Jul 2020 15:32:49 +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 E30E020781 for ; Thu, 2 Jul 2020 15:32:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E30E020781 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr1Ci-0000pN-2Z for qemu-devel@archiver.kernel.org; Thu, 02 Jul 2020 11:32:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17X-0000TU-AD for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:27 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:43037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17S-0006IL-Ba for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:27 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MhlbM-1jDGRk2hvc-00dlyL; Thu, 02 Jul 2020 17:27:12 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 01/12] target/sparc: Translate flushw opcode Date: Thu, 2 Jul 2020 17:26:59 +0200 Message-Id: <20200702152710.84602-2-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702152710.84602-1-laurent@vivier.eu> References: <20200702152710.84602-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:XAeweq2/wNjsvfr4kwoLXVH2UbpOdVUgt001l1B6y9UtnsVU7/i clHAVj3H2Z9dyFpumAwADp9qufvRmKHx136MWK6JP/Stv96litmiTkk0ujU/MunwGa3YW9s ILkNNe0xzuWocgcFemF73iiP+KxgObKhT5QL0gOQjKVhWu4JGf61QDoe+CePUOL1A9FRmMn 3hGIDTX1VoYsnCj2Sy3Yg== X-UI-Out-Filterresults: notjunk:1; V03:K0:j3CxfANrJiA=:cylJceBTqCdgyPcx1AcEz1 3RW6vms2WH41TLBe413qvBcpmPDavgEJp7i6rLZ2992UT8MW4VOml7PHnGu9/MKbwWzkHi8TS gYy6U1XmjRusa3YQ4b15wXGxnNVW3nzUMqJu2DETzkRbkvjCSrWJJkbFPQ7aTIDNEaPh/lLsB EA7RTu1xDYnhTPGZyhaIc9sJcIq9Z2cgTlq/t+hbpGMuzF/IkQwowu4i/81NcBoc51HF40J/h iKK0mfaHyMo7BvPYX37UDm9DhN5yuer/RStFqMd+FBkSg4Y2qTLMZztlo+SoPEvNZeZnJWgE7 soWbr0jiTFCPEi6jARgVboZrLX104lRWuUCQY+Cdo4c15oY+C5kRrssPxjslfEeOU6FjAOONA Ktx82zySZ47FYOX+IjbpGAXtO1zbYWpUduKtQevy9SKzJdPgwKno8Pahuuk3CAkA0Br6k7mXT f4irVCWIF1zTzoA+G5yzOGD3lHqQbIuKy3G2ysA/KWQz90OjTI+Kmt2mhkJ3ifh/uhtaHf75u x3/XQ08A2yZHXIaKJUXZiDHWXTWDWLWJpGnjQMCl+5+c2Nf2zATOLoI/smqmRaJJF+MNcIpE7 VvaxVWaYB/XkIzB72Sg0U0uVznDujf7uv5Gv3OQNr89pTlvCFemnPkGWC02M1Lf4Wsh95oiZt 4GRoH/ujFlXL+P/etmTAXvW1B49HKjOwWqNdU7OG2FMjothXwhC2+Y1qHP6j47WWFy9i2RBaV PuUx4wKRsDBkHtiBQunTYrfyCaDNvKgESZJfVx5PI959YhscXARZXdGSpN4SZD4yAcQY2PLic 81AsmTFXJRXBCSKUuPP10P4VvbeOvpZSS9kn3jpq8J1DIPa+9U= Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 11:27:21 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Giuseppe Musacchio , Mark Cave-Ayland , Riku Voipio , Richard Henderson , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Giuseppe Musacchio The ifdef logic should unconditionally compile in the `xop == 0x2b` case when targeting sparc64. Signed-off-by: Giuseppe Musacchio Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20200625091204.3186186-2-laurent@vivier.eu> --- target/sparc/translate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 9416a551cf46..1a4efd4ed665 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -3663,6 +3663,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) #endif gen_store_gpr(dc, rd, cpu_tmp0); break; +#endif +#if defined(TARGET_SPARC64) || !defined(CONFIG_USER_ONLY) } else if (xop == 0x2b) { /* rdtbr / V9 flushw */ #ifdef TARGET_SPARC64 gen_helper_flushw(cpu_env); From patchwork Thu Jul 2 15:27:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 278829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0A01C433DF for ; Thu, 2 Jul 2020 15:30:59 +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 B761420781 for ; Thu, 2 Jul 2020 15:30:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B761420781 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr1Aw-0006Iq-Ry for qemu-devel@archiver.kernel.org; Thu, 02 Jul 2020 11:30:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17c-0000gx-OG for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:32 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:36085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17Z-0006Jy-6H for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:32 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MWAjC-1jKRTc3KLi-00XdDH; Thu, 02 Jul 2020 17:27:15 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 03/12] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION Date: Thu, 2 Jul 2020 17:27:01 +0200 Message-Id: <20200702152710.84602-4-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702152710.84602-1-laurent@vivier.eu> References: <20200702152710.84602-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:A01o3pm6jUNrpc8TrQTyHer9BFukw6HaiLJ1ZfemwHHX+QyGSd6 vyON53tz8te2buwjGbwjzRUjX+FIogUfRFfZbhsMhgIzQAdnRTWm5NtqpSafHUhBVLue3cH /P9DArNfUbbdDGlWtC6BL9EvHzbIdNP7jPNZM6yysekJ5fUylddNFNppPFq09C2/eCVEDUS LN2Mj7sblCchsT9eo9WzA== X-UI-Out-Filterresults: notjunk:1; V03:K0:JhWTqS+2J74=:c/h0QWwelUFwE0ogSyk0Jl tPEYXWiAswAUnW/x0dEybNfIRcibtidVu1P/8ia07/A5zyswlyOBlZ0xOeKut46umYYeBLpnf y3xfkTZuDSJnXZp31GuxTqfrurTcwQ3LpYTFxXkU9apCuzH84+hywcKA+NoGbz+wFbRJJb5zq NK53Zo0PIBr4CqPrgkvvKXDAlWJNwyW2sxJrSmDzKMfXvYDgr2f6z2c2m02c0vIiNi0NgTDIc ZBId5E3N0A9gFhRB3AoCpBFBtTAgcDgXQeg5jWwqexhrTb9USUONUbt1pTn2WHA2fRNIDxsP3 wzWfqlOuLWI1x1rOIokO0rJ/cirs64S7nBkD3uwi/TMbBBwpoeSLPGj3Ilg+dttTe2joO662G hidfg7+Ckla01G5KSOE4pGC8yMyo3I9ZxIElbrv8PD4L9YA41v5mEdoR08AsNYd0y6t9M0I0n aB0cWQHznhqN0KrnbbMRrKlBsTba6F9SUVMZ4oAtX4TiQQLRDlZsaQrNx1V4LaZqEJrWM7W66 D+YYoCs8FQE4yvhIk0N4XwtY6nqQLVfEI8xnBjuwpq2J2vL1YRvR8L0R7IcOQvYRE36aM/i+1 gztLYb439Z2SEnNe+QGoi8Ct+TUa4+8fAbElbFGv86WlbZOo6uR8xBGQ+V7IfVer8mzuZEAgv opbEV4+yEhEiwTifrKWgXb70OEyQF9noaBK5cOraomKlYLR6yacSNuuQJHM7iA9zHjoOjtGFX eVwkXND2KSIXYh+uICWAkm6Km/bOfLaOr06FVNFvAENJKoM56b5viCPSUf4hrHg9mhNO/+ljW bJoDNooreqN9vhGywlFAnttOWsR2kgYBFsh8/EU+CH49QLDnxI= Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 11:27:21 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Chen Gang , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chen Gang Another DRM_IOCTL_* commands will be done later. Signed-off-by: Chen Gang Reviewed-by: Laurent Vivier Message-Id: <20200605013221.22828-1-chengang@emindsoft.com.cn> Signed-off-by: Laurent Vivier --- configure | 10 ++++ linux-user/ioctls.h | 5 ++ linux-user/syscall.c | 98 ++++++++++++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 15 ++++++ linux-user/syscall_types.h | 11 +++++ 5 files changed, 139 insertions(+) diff --git a/configure b/configure index 4a22dcd5631d..2014c72b674d 100755 --- a/configure +++ b/configure @@ -3194,6 +3194,13 @@ if ! check_include "ifaddrs.h" ; then have_ifaddrs_h=no fi +######################################### +# libdrm check +have_drm_h=no +if check_include "libdrm/drm.h" ; then + have_drm_h=yes +fi + ########################################## # VTE probe @@ -7377,6 +7384,9 @@ fi if test "$have_ifaddrs_h" = "yes" ; then echo "HAVE_IFADDRS_H=y" >> $config_host_mak fi +if test "$have_drm_h" = "yes" ; then + echo "HAVE_DRM_H=y" >> $config_host_mak +fi if test "$have_broken_size_max" = "yes" ; then echo "HAVE_BROKEN_SIZE_MAX=y" >> $config_host_mak fi diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 0defa1d8c18d..f2e2fa9c878b 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -574,6 +574,11 @@ IOCTL_SPECIAL(SIOCDELRT, IOC_W, do_ioctl_rt, MK_PTR(MK_STRUCT(STRUCT_rtentry))) +#ifdef HAVE_DRM_H + IOCTL_SPECIAL(DRM_IOCTL_VERSION, IOC_RW, do_ioctl_drm, + MK_PTR(MK_STRUCT(STRUCT_drm_version))) +#endif + #ifdef TARGET_TIOCSTART IOCTL_IGNORE(TIOCSTART) IOCTL_IGNORE(TIOCSTOP) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 97de9fb5c92a..17ed7f8d6b59 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -112,6 +112,9 @@ #include #include #include +#ifdef HAVE_DRM_H +#include +#endif #include "linux_loop.h" #include "uname.h" @@ -5276,6 +5279,101 @@ static abi_long do_ioctl_tiocgptpeer(const IOCTLEntry *ie, uint8_t *buf_temp, } #endif +#ifdef HAVE_DRM_H + +static void unlock_drm_version(struct drm_version *host_ver, + struct target_drm_version *target_ver, + bool copy) +{ + unlock_user(host_ver->name, target_ver->name, + copy ? host_ver->name_len : 0); + unlock_user(host_ver->date, target_ver->date, + copy ? host_ver->date_len : 0); + unlock_user(host_ver->desc, target_ver->desc, + copy ? host_ver->desc_len : 0); +} + +static inline abi_long target_to_host_drmversion(struct drm_version *host_ver, + struct target_drm_version *target_ver) +{ + memset(host_ver, 0, sizeof(*host_ver)); + + __get_user(host_ver->name_len, &target_ver->name_len); + if (host_ver->name_len) { + host_ver->name = lock_user(VERIFY_WRITE, target_ver->name, + target_ver->name_len, 0); + if (!host_ver->name) { + return -EFAULT; + } + } + + __get_user(host_ver->date_len, &target_ver->date_len); + if (host_ver->date_len) { + host_ver->date = lock_user(VERIFY_WRITE, target_ver->date, + target_ver->date_len, 0); + if (!host_ver->date) { + goto err; + } + } + + __get_user(host_ver->desc_len, &target_ver->desc_len); + if (host_ver->desc_len) { + host_ver->desc = lock_user(VERIFY_WRITE, target_ver->desc, + target_ver->desc_len, 0); + if (!host_ver->desc) { + goto err; + } + } + + return 0; +err: + unlock_drm_version(host_ver, target_ver, false); + return -EFAULT; +} + +static inline void host_to_target_drmversion( + struct target_drm_version *target_ver, + struct drm_version *host_ver) +{ + __put_user(host_ver->version_major, &target_ver->version_major); + __put_user(host_ver->version_minor, &target_ver->version_minor); + __put_user(host_ver->version_patchlevel, &target_ver->version_patchlevel); + __put_user(host_ver->name_len, &target_ver->name_len); + __put_user(host_ver->date_len, &target_ver->date_len); + __put_user(host_ver->desc_len, &target_ver->desc_len); + unlock_drm_version(host_ver, target_ver, true); +} + +static abi_long do_ioctl_drm(const IOCTLEntry *ie, uint8_t *buf_temp, + int fd, int cmd, abi_long arg) +{ + struct drm_version *ver; + struct target_drm_version *target_ver; + abi_long ret; + + switch (ie->host_cmd) { + case DRM_IOCTL_VERSION: + if (!lock_user_struct(VERIFY_WRITE, target_ver, arg, 0)) { + return -TARGET_EFAULT; + } + ver = (struct drm_version *)buf_temp; + ret = target_to_host_drmversion(ver, target_ver); + if (!is_error(ret)) { + ret = get_errno(safe_ioctl(fd, ie->host_cmd, ver)); + if (is_error(ret)) { + unlock_drm_version(ver, target_ver, false); + } else { + host_to_target_drmversion(target_ver, ver); + } + } + unlock_user_struct(target_ver, arg, 0); + return ret; + } + return -TARGET_ENOSYS; +} + +#endif + static IOCTLEntry ioctl_entries[] = { #define IOCTL(cmd, access, ...) \ { TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } }, diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 152ec637cba6..3c261cff0e5e 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1167,6 +1167,9 @@ struct target_rtc_pll_info { #define TARGET_DM_TARGET_MSG TARGET_IOWRU(0xfd, 0x0e) #define TARGET_DM_DEV_SET_GEOMETRY TARGET_IOWRU(0xfd, 0x0f) +/* drm ioctls */ +#define TARGET_DRM_IOCTL_VERSION TARGET_IOWRU('d', 0x00) + /* from asm/termbits.h */ #define TARGET_NCC 8 @@ -2598,6 +2601,18 @@ struct target_mq_attr { abi_long mq_curmsgs; }; +struct target_drm_version { + int version_major; + int version_minor; + int version_patchlevel; + abi_ulong name_len; + abi_ulong name; + abi_ulong date_len; + abi_ulong date; + abi_ulong desc_len; + abi_ulong desc; +}; + #include "socket.h" #include "errno_defs.h" diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index 4e12c1661ea6..e2b0484f50e5 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -292,6 +292,17 @@ STRUCT(dm_target_versions, STRUCT(dm_target_msg, TYPE_ULONGLONG) /* sector */ +STRUCT(drm_version, + TYPE_INT, /* version_major */ + TYPE_INT, /* version_minor */ + TYPE_INT, /* version_patchlevel */ + TYPE_ULONG, /* name_len */ + TYPE_PTRVOID, /* name */ + TYPE_ULONG, /* date_len */ + TYPE_PTRVOID, /* date */ + TYPE_ULONG, /* desc_len */ + TYPE_PTRVOID) /* desc */ + STRUCT(file_clone_range, TYPE_LONGLONG, /* src_fd */ TYPE_ULONGLONG, /* src_offset */ From patchwork Thu Jul 2 15:27:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 278832 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37B67C433E0 for ; Thu, 2 Jul 2020 15:28:21 +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 0EA292073E for ; Thu, 2 Jul 2020 15:28:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EA292073E 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr18O-00022r-5b for qemu-devel@archiver.kernel.org; Thu, 02 Jul 2020 11:28:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17T-0000R3-Ck for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:23 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:37651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17Q-0006I9-Le for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:23 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MryCb-1j33JZ1es9-00nuRY; Thu, 02 Jul 2020 17:27:16 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 05/12] linux-user: Add strace support for a group of syscalls Date: Thu, 2 Jul 2020 17:27:03 +0200 Message-Id: <20200702152710.84602-6-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702152710.84602-1-laurent@vivier.eu> References: <20200702152710.84602-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:1XMrjVSxvk9CB2IN39hZNQi6GlCjnaSIRXqvfwsk7CQsQVOLZLU cIMoafn1ymfoWo9hXCPjqzR4Bxvkl1aw3AM3JcqpZEuY0VWQOdDZfsnINJdLO9jGQtVp8sO ztP5dqIXmjhb2SligHAHN4GATatU1XgFdkvEu0x/4ucpBZAJdxjAQrozggQEVT9dI0MHAKA Ce34rpQM+oQan46ET3P5g== X-UI-Out-Filterresults: notjunk:1; V03:K0:2vMUf9oL1k8=:mzPIIG0JgQsmI9yJ4CiCIO iiO6iRyB/zKu2nZ3TRgshIlz799xhtqW1UFFlzeTwF3Osbi+GoautBmEOrNLf4nmkvXIoAVjv fjunVLcKtO/YXy4umSdOd3OxwZ1wXdVJTWU9IZtkTS08xm+2BPpicWSXuCTJVpvmd/BiVnHcV YMTNgpWk8EGtHgOiulwMjsZet0oanhGBqHsqp92jW499/BgOCzKR7zO4nzfbnJtuOZVX+MY9N DKXIsGLnHn7e2J55ScDfbnUjeVaszTPYXBSjQmc1DYR8JUOgP78N2ZWMWfken8jdpdK05sbhn rXjXL+7z+RR4qBFPoaRcHFmm3HN2IkZOAkhfDyVKS9kzuNuUv0NvxXW7uY+4vGpOcwN03DO8P LLpjNR0Iw8EfRv1ddtOZcdgic9w8Wz3XvCYgkvLC8gTiIBRmroqqLjhJjNkX+nvEIy+Ji/MNB fdbsFR6eiGh8e1UOQ1Hq9gTvloZ1CiVB0MisYZ3YCmNjaBYxFR3zNbkm5PB9PbZw0wcdwOf3S vhaS5VvXZoiifK+hvEr4NJ3wpeIIS179jsWeX4F0uUcbq4w4vGVvVOMdA/R5rYwQ6dGOy8rY6 qk4l2yaQEW4yxgeP1QbMgi6AfeZ1rLxCEiSGj2x3ssCdo3+vayPjECUo0WbLgSmxAOWAVcUs0 ZL2qoHLLwQN0riy/CrNNK2FmYkBsN/gHTzKYBGaF2twZqsLrqbGQxaGorU3u6A8EFtVWvo/1R 7Pti8uehj9NccUTrlfl3zGOgzaGhqAJdz98vNcs2bvcWhOyZhR3ePN6dZTr5yDVfEh4oFquGV eiA4UpKX9PX/qZaq8rxEiYW0wF0/YOkjVZGk8+uedMhU1TZb3A= Received-SPF: none client-ip=212.227.126.133; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 11:27:18 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Filip Bozuta , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Filip Bozuta This patch implements strace argument printing functionality for following syscalls: *acct - switch process accounting on or off int acct(const char *filename) man page: https://www.man7.org/linux/man-pages/man2/acct.2.html *fsync, fdatasync - synchronize a file's in-core state with storage device int fsync(int fd) int fdatasync(int fd) man page: https://www.man7.org/linux/man-pages/man2/fsync.2.html *listen - listen for connections on a socket int listen(int sockfd, int backlog) man page: https://www.man7.org/linux/man-pages/man2/listen.2.html Implementation notes: Syscall acct() takes string as its only argument and thus a separate print function "print_acct" is stated in file "strace.list". This function is defined and implemented in "strace.c" by using an existing function used to print string arguments: "print_string()". All the other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier Message-Id: <20200619123331.17387-3-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 13 ++++++++++++- linux-user/strace.list | 8 ++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 62117e8555f6..123e022c35bf 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1357,6 +1357,18 @@ print_access(const struct syscallname *name, } #endif +#ifdef TARGET_NR_acct +static void +print_acct(const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_string(arg0, 1); + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_brk static void print_brk(const struct syscallname *name, @@ -1621,7 +1633,6 @@ print_fcntl(const struct syscallname *name, #define print_fcntl64 print_fcntl #endif - #ifdef TARGET_NR_futimesat static void print_futimesat(const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index 9281c0a75828..8a887fc16dcc 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -13,7 +13,7 @@ { TARGET_NR_access, "access" , NULL, print_access, NULL }, #endif #ifdef TARGET_NR_acct -{ TARGET_NR_acct, "acct" , NULL, NULL, NULL }, +{ TARGET_NR_acct, "acct" , NULL, print_acct, NULL }, #endif #ifdef TARGET_NR_add_key { TARGET_NR_add_key, "add_key" , NULL, NULL, NULL }, @@ -215,7 +215,7 @@ { TARGET_NR_fcntl64, "fcntl64" , NULL, print_fcntl64, NULL }, #endif #ifdef TARGET_NR_fdatasync -{ TARGET_NR_fdatasync, "fdatasync" , NULL, NULL, NULL }, +{ TARGET_NR_fdatasync, "fdatasync" , "%s(%d)", NULL, NULL }, #endif #ifdef TARGET_NR_fgetxattr { TARGET_NR_fgetxattr, "fgetxattr" , NULL, NULL, NULL }, @@ -251,7 +251,7 @@ { TARGET_NR_fstatfs64, "fstatfs64" , "%s(%d,%p)", NULL, NULL }, #endif #ifdef TARGET_NR_fsync -{ TARGET_NR_fsync, "fsync" , NULL, NULL, NULL }, +{ TARGET_NR_fsync, "fsync" , "%s(%d)", NULL, NULL }, #endif #ifdef TARGET_NR_ftime { TARGET_NR_ftime, "ftime" , NULL, NULL, NULL }, @@ -492,7 +492,7 @@ { TARGET_NR_Linux, "Linux" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_listen -{ TARGET_NR_listen, "listen" , NULL, NULL, NULL }, +{ TARGET_NR_listen, "listen" , "%s(%d,%d)", NULL, NULL }, #endif #ifdef TARGET_NR_listxattr { TARGET_NR_listxattr, "listxattr" , NULL, NULL, NULL }, From patchwork Thu Jul 2 15:27:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 278831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DFEAC433DF for ; Thu, 2 Jul 2020 15:28:26 +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 159852073E for ; Thu, 2 Jul 2020 15:28:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 159852073E 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr18T-0002Fl-9p for qemu-devel@archiver.kernel.org; Thu, 02 Jul 2020 11:28:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17V-0000SC-6T for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:25 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:53833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17R-0006IG-Ix for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:24 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MTi9N-1jMved0xQr-00U4JY; Thu, 02 Jul 2020 17:27:18 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 07/12] linux-user: Add strace support for printing arguments of lseek() Date: Thu, 2 Jul 2020 17:27:05 +0200 Message-Id: <20200702152710.84602-8-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702152710.84602-1-laurent@vivier.eu> References: <20200702152710.84602-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:MS247B+cncjovVzKNv2NhuUL3/8iqUyBUSgZ1hmQE++EIQRwNLx jPatrNpAbmjUICNEd57J0k/QUUFuj9TzuXgX5AJfBsjUieDK6M1j/XgpD/PE2uXLjFc6t64 sVASvCdKUXeBnrJGNBhN5Lw+Vmlosbmhkf4FQKBZ7m2+xk9xbOwXnS5dDFR0zWJfNYl/Vx1 kZDmwn/k7Xclxcouw3lag== X-UI-Out-Filterresults: notjunk:1; V03:K0:kyeEI88sOJk=:Y2bHPOyoGrJ7VtdQhmFkzS inZq9SICvnStcpBuYQw2yD0iNAMIUI2p1sEKiPlZV8MCmRsNUJ3Bu/j0LCzXqcXtgAkCxa61I 2rmF5QRNzsoA7AL/8ZHJjWTLLVpdlAYnDOyp1csm+BNExfT+70mEnlOgQhXT/JZpdBwinRM0J QqQ6GDloQjkTausxe9zXZdGD1bL7yWP+Y/T05JDOaq5vd2iUiwWIu4Hq5WbfHl8KYNBwcklX9 Lp4pEMOQrxH3Y9Csb9JXH+9hb+bnmJggUzqUwbIRKWK0l4NVAa7mIGEheyLJr/8s2GFxF/2/o FMf59gct92nJOGPQiQNzt+6Yu2TW/lpH10Zd1A2P+NjyBUZAAX0JEJpeGl8dOXmuy+128aTHz JQdYNZ1yCIi/e0/w+5Y7iR1yUKG20epHZ2RiAaPNpl1lS2ZSrMKzmtjLrY3dadydAaPF+waBJ amMUy5/WIG7Km7Hxf/3L22u+W+kiSiu7yFlL5G/o91jiLbWm+S5P9/bvhE/v8F2cJo4Zeew7Y wX2Fs32eZnSuhqcQ4N9+mCyg+/sbwdikrwtuBSvX2568mjUxvtTczyJ9Wlg7ggtJ4hOoceZ4Q QLwFxa/n5UD0Owv3lkHphRVFSgo8gVC1PjmaONp3U72BUR0dlYgjAwK+ATHjq8tSdR86ILWN5 DQTf9yeZrR7XSMQqoK5Q+5nw/nDAHwSrAggmiorIZui/d15YzQ6Sg4We/YbzYjua2O/Yvnk+O +CxehaHRa6Ik/OlbTxHdP5aXr59fYmBew/baAQoKrZY1spZNkG8q2AAQpx5W+3mGvWoa0EgSj WUJ7H+878L4p64HSqjOPtWClvFZ1dwQXLOBQXSlCASaYaO/PUc= Received-SPF: none client-ip=212.227.126.133; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 11:27:18 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Filip Bozuta , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Filip Bozuta This patch implements strace argument printing functionality for syscall: *lseek - reposition read/write file offset off_t lseek(int fd, off_t offset, int whence) man page: https://www.man7.org/linux/man-pages/man2/lseek.2.html Implementation notes: The syscall's third argument "whence" has predefined values: "SEEK_SET","SEEK_CUR","SEEK_END","SEEK_DATA","SEEK_HOLE" and thus a separate printing function "print_lseek" was stated in file "strace.list". This function is defined in "strace.c" by using an existing function "print_raw_param()" to print the first and second argument and a switch(case) statement for the predefined values of the third argument. Values "SEEK_DATA" and "SEEK_HOLE" are defined in kernel version 3.1. That is the reason why case statements for these values are enwrapped in #ifdef directive. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier Message-Id: <20200619123331.17387-5-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 31 +++++++++++++++++++++++++++++++ linux-user/strace.list | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 760020132b5a..a26736516bab 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1833,6 +1833,37 @@ print__llseek(const struct syscallname *name, } #endif +#ifdef TARGET_NR_lseek +static void +print_lseek(const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_raw_param("%d", arg0, 0); + print_raw_param(TARGET_ABI_FMT_ld, arg1, 0); + switch (arg2) { + case SEEK_SET: + qemu_log("SEEK_SET"); break; + case SEEK_CUR: + qemu_log("SEEK_CUR"); break; + case SEEK_END: + qemu_log("SEEK_END"); break; +#ifdef SEEK_DATA + case SEEK_DATA: + qemu_log("SEEK_DATA"); break; +#endif +#ifdef SEEK_HOLE + case SEEK_HOLE: + qemu_log("SEEK_HOLE"); break; +#endif + default: + print_raw_param("%#x", arg2, 1); + } + print_syscall_epilogue(name); +} +#endif + #if defined(TARGET_NR_socket) static void print_socket(const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index d04ad507b0fb..a4a8c61969cd 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -516,7 +516,7 @@ { TARGET_NR_lremovexattr, "lremovexattr" , NULL, print_lremovexattr, NULL }, #endif #ifdef TARGET_NR_lseek -{ TARGET_NR_lseek, "lseek" , NULL, NULL, NULL }, +{ TARGET_NR_lseek, "lseek" , NULL, print_lseek, NULL }, #endif #ifdef TARGET_NR_lsetxattr { TARGET_NR_lsetxattr, "lsetxattr" , NULL, NULL, NULL }, From patchwork Thu Jul 2 15:27:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 278823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F04FEC433DF for ; Thu, 2 Jul 2020 15:38:37 +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 C21BC20737 for ; Thu, 2 Jul 2020 15:38:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C21BC20737 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr1IL-0003RY-2G for qemu-devel@archiver.kernel.org; Thu, 02 Jul 2020 11:38:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17d-0000ht-1x for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:33 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:43027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17Y-0006Jm-KZ for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:32 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MbAxU-1jFTNX29A8-00bbBZ; Thu, 02 Jul 2020 17:27:19 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 09/12] linux-user: Add strace support for printing arguments of fallocate() Date: Thu, 2 Jul 2020 17:27:07 +0200 Message-Id: <20200702152710.84602-10-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702152710.84602-1-laurent@vivier.eu> References: <20200702152710.84602-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:wAQbsdi2ybPskcxRUNZ0iiHDf3KChToM9lAyGJ/WqCrR5Cb3DwY dNx35lwhloNcujyEx42X/KuzYDqinGVW+C//Wzqg3zh9E456muP2XB9Tfm3rzDKlO6rJFQh JzlbX3eIZOR86s2YbcFGEMnembPeEZYFCp47rGsUAcCN2LVTIIEGKQPO4boTx2UelmfdE02 5iKm1C6Oo9jDU+niAF66w== X-UI-Out-Filterresults: notjunk:1; V03:K0:OkLfliOPCGo=:vuJPrLrM2cM0b8opczaD7p KHcsgFu/KT6l1vylxMksYvRoBdwNwHRl5huljwG+snoheC7lCyg3b4HlQU8otvRXyHHDeQX5v qtFm2DeVcJ+fA2cQ80c6ZBngSrSKm9VDjzBii6I8Odvwxv1WiXAQBJ4lzKE6hllbkyoUrHx8t 08aLjDTBRcq8iaye7nTiXeHZg0x4pCgczBbSh0K9ej8YWMCtv22jQAf70vo9rIoryHkB7x06I RXSj6jEOJfj1FVopYx6/Xv39LRLFQzKENEPw8korUcw+NrIKQprLphIneJudRx8SzhstvWBs6 s2hWLS6XNpqHTPXfNefSd6rBUGyVUNbls50LRKpUwWf+rM84y0a8JZxYKrWoyoraU69prWbyn fOkJkYHJyebK69XX/3JPTMH/LxSFwzOGODIkiHehD6UfawtrivUbyqIXZb/b/fDNqO/F55vCp AqVH5Q7T9s9aic6a7Nouj9c1AR5sxEsq4v8uODmpVAlWhjKFAhRtIQww6W8p6vVCL/aNRw8rh uNLZOgvQ+XaN/LADXiDH1tGAOm8ZVML34tIc3Giy6t4nqR1r0U46jDztu9suHc4YfUv9J0l75 tM+i5h4MgtvpI9ocD+eSX2oB99lrqzNzK9MqA4t21sbIJglCyuhzdExybo1NkL114Und308c3 74U/Cx16siGvMD9l4KFPn0nuc2n7euUCbQJYBqPgcxuHXjqPFU0chpb7atIalrwey9PEJWAMl 11haurRszZxZjcD7qxmJB6ARGJn61ULOL5g/ZJep0/Bhny11O0pFxTfJoj+kwBeHFuUboFMJo uUHcE6GZ6a1XiNKGZrf8JYBpbYoITVmV7QndD3q8Hl0gAAwQhg= Received-SPF: none client-ip=212.227.126.135; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 10:57:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Filip Bozuta , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Filip Bozuta This patch implements strace argument printing functionality for following syscall: *fallocate - manipulate file space int fallocate(int fd, int mode, off_t offset, off_t len) man page: https://www.man7.org/linux/man-pages/man2/fallocate.2.html Implementation notes: This syscall's second argument "mode" is composed of predefined values which represent flags that determine the type of operation that is to be performed on the file space. For that reason, a printing function "print_fallocate" was stated in file "strace.list". This printing function uses an already existing function "print_flags()" to print flags of the "mode" argument. These flags are stated inside an array "falloc_flags" that contains values of type "struct flags". These values are instantiated using an existing macro "FLAG_GENERIC()". Most of these flags are defined after kernel version 3.0 which is why they are enwrapped in an #ifdef directive. The syscall's third ant fourth argument are of type "off_t" which can cause variations between 32/64-bit architectures. To handle this variation, function "target_offset64()" was copied from file "strace.c" and used in "print_fallocate" to print "off_t" arguments for 32-bit architectures. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier Message-Id: <20200619123331.17387-7-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier --- linux-user/qemu.h | 16 ++++++++++++++++ linux-user/strace.c | 40 ++++++++++++++++++++++++++++++++++++++++ linux-user/strace.list | 2 +- linux-user/syscall.c | 16 ---------------- 4 files changed, 57 insertions(+), 17 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 8f938b8105b3..be67391ba49d 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -670,6 +670,22 @@ static inline int is_error(abi_long ret) return (abi_ulong)ret >= (abi_ulong)(-4096); } +#if TARGET_ABI_BITS == 32 +static inline uint64_t target_offset64(uint32_t word0, uint32_t word1) +{ +#ifdef TARGET_WORDS_BIGENDIAN + return ((uint64_t)word0 << 32) | word1; +#else + return ((uint64_t)word1 << 32) | word0; +#endif +} +#else /* TARGET_ABI_BITS == 32 */ +static inline uint64_t target_offset64(uint64_t word0, uint64_t word1) +{ + return word0; +} +#endif /* TARGET_ABI_BITS != 32 */ + /** * preexit_cleanup: housekeeping before the guest exits * diff --git a/linux-user/strace.c b/linux-user/strace.c index 957f08f1adf2..32e5e987acbb 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1135,6 +1135,26 @@ UNUSED static struct flags statx_mask[] = { FLAG_END, }; +UNUSED static struct flags falloc_flags[] = { + FLAG_GENERIC(FALLOC_FL_KEEP_SIZE), + FLAG_GENERIC(FALLOC_FL_PUNCH_HOLE), +#ifdef FALLOC_FL_NO_HIDE_STALE + FLAG_GENERIC(FALLOC_FL_NO_HIDE_STALE), +#endif +#ifdef FALLOC_FL_COLLAPSE_RANGE + FLAG_GENERIC(FALLOC_FL_COLLAPSE_RANGE), +#endif +#ifdef FALLOC_FL_ZERO_RANGE + FLAG_GENERIC(FALLOC_FL_ZERO_RANGE), +#endif +#ifdef FALLOC_FL_INSERT_RANGE + FLAG_GENERIC(FALLOC_FL_INSERT_RANGE), +#endif +#ifdef FALLOC_FL_UNSHARE_RANGE + FLAG_GENERIC(FALLOC_FL_UNSHARE_RANGE), +#endif +}; + /* * print_xxx utility functions. These are used to print syscall * parameters in certain format. All of these have parameter @@ -1552,6 +1572,26 @@ print_faccessat(const struct syscallname *name, } #endif +#ifdef TARGET_NR_fallocate +static void +print_fallocate(const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_raw_param("%d", arg0, 0); + print_flags(falloc_flags, arg1, 0); +#if TARGET_ABI_BITS == 32 + print_raw_param("%" PRIu64, target_offset64(arg2, arg3), 0); + print_raw_param("%" PRIu64, target_offset64(arg4, arg5), 1); +#else + print_raw_param(TARGET_ABI_FMT_ld, arg2, 0); + print_raw_param(TARGET_ABI_FMT_ld, arg3, 1); +#endif + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_fchmodat static void print_fchmodat(const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index e99030c9ef39..ebb713252ce3 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -182,7 +182,7 @@ { TARGET_NR_fadvise64_64, "fadvise64_64" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_fallocate -{ TARGET_NR_fallocate, "fallocate" , NULL, NULL, NULL }, +{ TARGET_NR_fallocate, "fallocate" , NULL, print_fallocate, NULL }, #endif #ifdef TARGET_NR_fanotify_init { TARGET_NR_fanotify_init, "fanotify_init" , NULL, NULL, NULL }, diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1b971c06b270..506b94a12c1e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6712,22 +6712,6 @@ void syscall_init(void) } } -#if TARGET_ABI_BITS == 32 -static inline uint64_t target_offset64(uint32_t word0, uint32_t word1) -{ -#ifdef TARGET_WORDS_BIGENDIAN - return ((uint64_t)word0 << 32) | word1; -#else - return ((uint64_t)word1 << 32) | word0; -#endif -} -#else /* TARGET_ABI_BITS == 32 */ -static inline uint64_t target_offset64(uint64_t word0, uint64_t word1) -{ - return word0; -} -#endif /* TARGET_ABI_BITS != 32 */ - #ifdef TARGET_NR_truncate64 static inline abi_long target_truncate64(void *cpu_env, const char *arg1, abi_long arg2, From patchwork Thu Jul 2 15:27:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 278822 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4A56C433E0 for ; Thu, 2 Jul 2020 15:41:09 +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 BA1B420748 for ; Thu, 2 Jul 2020 15:41:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA1B420748 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr1Km-0006B7-Tm for qemu-devel@archiver.kernel.org; Thu, 02 Jul 2020 11:41:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17d-0000jY-MV for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:33 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:37185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17Z-0006KA-ED for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:33 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MQdtO-1jUNd01ICk-00Nkn9; Thu, 02 Jul 2020 17:27:20 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 10/12] linux-user: Add thunk argument types for SIOCGSTAMP and SIOCGSTAMPNS Date: Thu, 2 Jul 2020 17:27:08 +0200 Message-Id: <20200702152710.84602-11-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702152710.84602-1-laurent@vivier.eu> References: <20200702152710.84602-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:3nIlbLU+2yQQKq6NSedOQYPnM4aUXCiwBB0MsNrGnBnEO0mZ4Wd +g4kt6vYOXkWHWhNm3rwGXzTcCab14RncLgR2kk5c5u0mZXNVoUZTNz4UbhIjJHjk1TzaP+ 6hXO8b6Y29O8sN/KmHUaLgYYheSEwj8yTHvWAANWBIz3v2YXWCVxViBORyHUd1SgIXHO//u DU1/wx7bMEIJv4L6goCjA== X-UI-Out-Filterresults: notjunk:1; V03:K0:KPLfRaGoZa0=:ZPpFdgIoaNyOjWACIrLNks uVrd8dUh2mgL+BnJmCDhEY3ipDFyqWqwj1jhYOD6CzoMInqPPUt274kE9GIoYSKMVLSB9WkOs 2zdtESmCcwYmepS3ZXsSP+ZDqGYp0YeqziVqWytgui+RXoUYJ55bWVTBaE5CoLNbKmk/7CXj7 76H+9Khmf+2KAqzM9JKjKx56Thv3+NEzBwY7lfaZU7chkRvqcqYrfBRjFJOSIyPNI8MiluQKH MRp1TUukxi3Sv33eoKC55RVmXVn0FDMV5Td1IuMuikyt7OdDivSQw1ym4qRfDoe+SCdi/cnP1 XTH2L5tQk1gBOApsm+3v9I4h4hhw3PkonMV4aTQi2tbWNhxhOEj6hZo5YFZYuHVIeX2dArQAB 7Zw8iYsXqwMqSC+GUPSg4xoFxioXlSgtn4Vw4fHW/Sada10yAAcEdkyTFoOhjPYjO4Q6wmLyr K4/hZDGCm07WWVzKsUk200wInGvDnQtVSVmpIbQ0DkYFoVR02bwji+Llfm3xs8znfdkAHdjhk o3rIjymNXDY0kGoz7gmnx5GIWxLOeeDPNVT3axaZjCh5tsu8FKKPkb001bnGxyGYh1AIj1HVZ Lrk8FVuAasOBPwWsmKclq6WWKKUQVtp/67NjR7miIg1yy9nfLFSeZvZhcbPtPmGA0M9U1kdHl d7uyFSAUgGrjyl9UK6bZ4SMTw9otdm9CJFbNEDoy2D3lBQ588ULQn+SHMYx+GWorvB1dhePnc n4PvZBJCIDjd0vUSMSIelJj07RrM57stSCPibZemgUjyQUIiwNs0vRLh9iM3gjdoxIZWyc8wd n43bVnQk2ZshMAk40dbA1Ux20rlHISWzCljPBTrpnYXZilHsoU= Received-SPF: none client-ip=212.227.126.133; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 11:27:18 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Filip Bozuta , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Filip Bozuta Socket ioctls SIOCGSTAMP and SIOCGSTAMPNS, used for timestamping the socket connection, are defined in file "ioctls.h" differently from other ioctls. The reason for this difference is explained in the comments above their definition. These ioctls didn't have defined thunk argument types before changes from this patch. They have special handling functions ("do_ioctl_SIOCGSTAMP" and "do_ioctl_SIOCGSTAMPNS") that take care of setting values for approppriate argument types (struct timeval and struct timespec) and thus no thunk argument types were needed for their implementation. But this patch adds those argument type definitions in file "syscall_types.h" and "ioctls.h" as it is needed for printing arguments of these ioctls with strace. Implementation notes: There are two variants of these ioctls: SIOCGSTAMP_OLD/SIOCGSTAM_NEW and SIOCGSTAMPNS_OLD/SIOCGSTAMPNS_NEW. One is the old existing definition and the other is the 2038 safe variant used for 32-bit architectures. Corresponding structure definitions STRUCT_timespec/STRUCT__kernel_timespec and STRUCT_timeval/STRUCT__kernel_sock_timeval were added for these variants. STRUCT_timeval definition was already inside the file as it is used by another implemented ioctl. Two cases were added for definitions STRUCT_timeval/STRUCT__kernel_sock_timeval to manage the case when the "u_sec" field of the timeval structure is of type int. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier Message-Id: <20200619124727.18080-2-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier --- linux-user/ioctls.h | 12 ++++++++---- linux-user/syscall_types.h | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index f2e2fa9c878b..0713ae131162 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -279,13 +279,17 @@ * FIXME: create a macro to define this kind of entry */ { TARGET_SIOCGSTAMP_OLD, TARGET_SIOCGSTAMP_OLD, - "SIOCGSTAMP_OLD", IOC_R, do_ioctl_SIOCGSTAMP }, + "SIOCGSTAMP_OLD", IOC_R, do_ioctl_SIOCGSTAMP, + { MK_PTR(MK_STRUCT(STRUCT_timeval)) } }, { TARGET_SIOCGSTAMPNS_OLD, TARGET_SIOCGSTAMPNS_OLD, - "SIOCGSTAMPNS_OLD", IOC_R, do_ioctl_SIOCGSTAMPNS }, + "SIOCGSTAMPNS_OLD", IOC_R, do_ioctl_SIOCGSTAMPNS, + { MK_PTR(MK_STRUCT(STRUCT_timespec)) } }, { TARGET_SIOCGSTAMP_NEW, TARGET_SIOCGSTAMP_NEW, - "SIOCGSTAMP_NEW", IOC_R, do_ioctl_SIOCGSTAMP }, + "SIOCGSTAMP_NEW", IOC_R, do_ioctl_SIOCGSTAMP, + { MK_PTR(MK_STRUCT(STRUCT__kernel_sock_timeval)) } }, { TARGET_SIOCGSTAMPNS_NEW, TARGET_SIOCGSTAMPNS_NEW, - "SIOCGSTAMPNS_NEW", IOC_R, do_ioctl_SIOCGSTAMPNS }, + "SIOCGSTAMPNS_NEW", IOC_R, do_ioctl_SIOCGSTAMPNS, + { MK_PTR(MK_STRUCT(STRUCT__kernel_timespec)) } }, IOCTL(RNDGETENTCNT, IOC_R, MK_PTR(TYPE_INT)) IOCTL(RNDADDTOENTCNT, IOC_W, MK_PTR(TYPE_INT)) diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index e2b0484f50e5..3f1f0334649b 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -137,10 +137,32 @@ STRUCT(snd_timer_params, TYPE_INT, /* filter */ MK_ARRAY(TYPE_CHAR, 60)) /* reserved */ +#if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) +STRUCT(timeval, + TYPE_LONG, /* tv_sec */ + TYPE_INT) /* tv_usec */ + +STRUCT(_kernel_sock_timeval, + TYPE_LONG, /* tv_sec */ + TYPE_INT) /* tv_usec */ +#else +STRUCT(timeval, + TYPE_LONG, /* tv_sec */ + TYPE_LONG) /* tv_usec */ + +STRUCT(_kernel_sock_timeval, + TYPE_LONGLONG, /* tv_sec */ + TYPE_LONGLONG) /* tv_usec */ +#endif + STRUCT(timespec, TYPE_LONG, /* tv_sec */ TYPE_LONG) /* tv_nsec */ +STRUCT(_kernel_timespec, + TYPE_LONGLONG, /* tv_sec */ + TYPE_LONGLONG) /* tv_nsec */ + STRUCT(snd_timer_status, MK_STRUCT(STRUCT_timespec), /* tstamp */ TYPE_INT, /* resolution */ From patchwork Thu Jul 2 15:27:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 278826 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D6F9C433E0 for ; Thu, 2 Jul 2020 15:34:54 +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 245C020781 for ; Thu, 2 Jul 2020 15:34:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 245C020781 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr1Ej-0004Jl-DY for qemu-devel@archiver.kernel.org; Thu, 02 Jul 2020 11:34:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17Y-0000VW-Cj for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:28 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:55509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17U-0006Iw-KR for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:28 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Ma1oK-1jKzi03uVg-00VxzB; Thu, 02 Jul 2020 17:27:21 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 11/12] linux-user: Add strace support for printing arguments of ioctl() Date: Thu, 2 Jul 2020 17:27:09 +0200 Message-Id: <20200702152710.84602-12-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702152710.84602-1-laurent@vivier.eu> References: <20200702152710.84602-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:E+0dm+HWfCguEDzHrtn8eQbhZFfat0ROl5K0fA5A9/w8sctK+RM Xo06laWCKAeFZylufldzBYcMjZmgycJOp+Z6Zddg4T+g/KkRp72oYKfuf0B5MKRbjqoTgXg 1/c9oy8DrEbnAfZ98Px4/A3ZuEKlETEwNTqXIBeNGsRwv61WkufbKBS8tVZ9g4MypmWDTpa oRhx325XfXnT4HuRWRS1w== X-UI-Out-Filterresults: notjunk:1; V03:K0:JLhb5A2y2mw=:9dXDTE5bDUsN2X9M46nbqO hTrKTXSTkb50uL06jkyu2kfptRz8SMDC0LXWszYUIqirLu5oeFOvQE7PrRCdNwr2ySk0U+OS8 15Naz9rCcy/Z7bY+tWNWwvDsHVa/eqo+4qRWUgmPKnwGz15ESGpBZeYzxMMG7gHLMhFahGu2X uwPyy+NkL6gXGr6+XdPSG6gL4E/m5XgiJnWfsZCiAcQwyhzczUoaEifL87KaGpJdKyw/RPE4J 0ipt6Te3B5ILAchNVc/XH4pSEvQkniCxCDV2STsojhoTXAezEO6BJGPckW+DDY9S1sf/jClHw +fgNJmWBcuvaMfoniXGQGifISVVvAyDoWU6623Co2DOLVW39dRj9MaZtBEnzZH2JfcFTNzKB5 pKgUkJ7L0xWUwAXENShwsCE0hMTQ0HKYZ8akZK+G7UpZyV5ZLbCFA2mx5d5h95pwOpvRmW72O 2sni7DL4ExdtdQC5AKGQa91NiZgYJ2YopVnKroE5W1fnRLlAJ3XDuZRgr/mbA8MSYEbO7+FWE JxNcfopPavT/k6BAIWgjivx8x18mtVrn199GUjUrXbSBkvBsyJjvSe6q5UmCjx7PlXGBIlqEC R8zJJCWWp3A263zghCvkUhifytdy8srYnjaRYXRQYWd9XYgsMBrn0vPjHioydFicn40F96raS 9RB6auCHrRrWdo92rLsRzYr9ZswNcYJhWLVm4iImHak4DXq4XXmm4GmnPsKf73tZ71qnAQ+0h 6SfqD5qxh8X0aB2pi4NSjCYx2UI889sIDhDJHxjnBCkeIU35W7yQucQ5Gnyy2VnVaVzW7cNJj io0En4lxZ+1ZOZebnDndMz2Y4cxANdZ8lcF5VSkMKfojAgVTEQ= Received-SPF: none client-ip=212.227.126.134; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 11:27:23 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Filip Bozuta , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Filip Bozuta This patch implements functionality for strace argument printing for ioctls. When running ioctls through qemu with "-strace", they get printed in format: "ioctl(fd_num,0x*,0x*) = ret_value" where the request code an the ioctl's third argument get printed in a hexadicemal format. This patch changes that by enabling strace to print both the request code name and the contents of the third argument. For example, when running ioctl RTC_SET_TIME with "-strace", with changes from this patch, it gets printed in this way: "ioctl(3,RTC_SET_TIME,{12,13,15,20,10,119,0,0,0}) = 0" In case of IOC_R type ioctls, the contents of the third argument get printed after the return value, and the argument inside the ioctl call gets printed as pointer in hexadecimal format. For example, when running RTC_RD_TIME with "-strace", with changes from this patch, it gets printed in this way: "ioctl(3,RTC_RD_TIME,0x40800374) = 0 ({22,9,13,11,5,120,0,0,0})" In case of IOC_RW type ioctls, the contents of the third argument get printed both inside the ioctl call and after the return value. Implementation notes: Functions "print_ioctl()" and "print_syscall_ret_ioctl()", that are defined in "strace.c", are listed in file "strace.list" as "call" and "result" value for ioctl. Structure definition "IOCTLEntry" as well as predefined values for IOC_R, IOC_W and IOC_RW were cut and pasted from file "syscall.c" to file "qemu.h" so that they can be used by these functions to print the contents of the third ioctl argument. Also, the "static" identifier for array "ioctl_entries[]" was removed and this array was declared as "extern" in "qemu.h" so that it can also be used by these functions. To decode the structure type of the ioctl third argument, function "thunk_print()" was defined in file "thunk.c" and its definition is somewhat simillar to that of function "thunk_convert()". Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier Message-Id: <20200619124727.18080-3-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier --- include/exec/user/thunk.h | 1 + linux-user/qemu.h | 20 +++++ linux-user/strace.c | 107 ++++++++++++++++++++++++++ linux-user/strace.list | 3 +- linux-user/syscall.c | 20 +---- thunk.c | 154 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 285 insertions(+), 20 deletions(-) diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h index eae2c27f99da..7992475c9f8a 100644 --- a/include/exec/user/thunk.h +++ b/include/exec/user/thunk.h @@ -73,6 +73,7 @@ void thunk_register_struct_direct(int id, const char *name, const StructEntry *se1); const argtype *thunk_convert(void *dst, const void *src, const argtype *type_ptr, int to_host); +const argtype *thunk_print(void *arg, const argtype *type_ptr); extern StructEntry *struct_entries; diff --git a/linux-user/qemu.h b/linux-user/qemu.h index be67391ba49d..5c964389c101 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -184,6 +184,26 @@ struct linux_binprm { int (*core_dump)(int, const CPUArchState *); /* coredump routine */ }; +typedef struct IOCTLEntry IOCTLEntry; + +typedef abi_long do_ioctl_fn(const IOCTLEntry *ie, uint8_t *buf_temp, + int fd, int cmd, abi_long arg); + +struct IOCTLEntry { + int target_cmd; + unsigned int host_cmd; + const char *name; + int access; + do_ioctl_fn *do_ioctl; + const argtype arg_type[5]; +}; + +extern IOCTLEntry ioctl_entries[]; + +#define IOC_R 0x0001 +#define IOC_W 0x0002 +#define IOC_RW (IOC_R | IOC_W) + void do_init_thread(struct target_pt_regs *regs, struct image_info *infop); abi_ulong loader_build_argptr(int envc, int argc, abi_ulong sp, abi_ulong stringp, int push_ptr); diff --git a/linux-user/strace.c b/linux-user/strace.c index 32e5e987acbb..5235b2260cdd 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -860,6 +860,44 @@ print_syscall_ret_listxattr(const struct syscallname *name, abi_long ret, #define print_syscall_ret_flistxattr print_syscall_ret_listxattr #endif +#ifdef TARGET_NR_ioctl +static void +print_syscall_ret_ioctl(const struct syscallname *name, abi_long ret, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_err(ret); + + if (ret >= 0) { + qemu_log(TARGET_ABI_FMT_ld, ret); + + const IOCTLEntry *ie; + const argtype *arg_type; + void *argptr; + int target_size; + + for (ie = ioctl_entries; ie->target_cmd != 0; ie++) { + if (ie->target_cmd == arg1) { + break; + } + } + + if (ie->target_cmd == arg1 && + (ie->access == IOC_R || ie->access == IOC_RW)) { + arg_type = ie->arg_type; + qemu_log(" ("); + arg_type++; + target_size = thunk_type_size(arg_type, 0); + argptr = lock_user(VERIFY_READ, arg2, target_size, 1); + thunk_print(argptr, arg_type); + unlock_user(argptr, arg2, target_size); + qemu_log(")"); + } + } + qemu_log("\n"); +} +#endif + UNUSED static struct flags access_flags[] = { FLAG_GENERIC(F_OK), FLAG_GENERIC(R_OK), @@ -3026,6 +3064,75 @@ print_statx(const struct syscallname *name, } #endif +#ifdef TARGET_NR_ioctl +static void +print_ioctl(const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_raw_param("%d", arg0, 0); + + const IOCTLEntry *ie; + const argtype *arg_type; + void *argptr; + int target_size; + + for (ie = ioctl_entries; ie->target_cmd != 0; ie++) { + if (ie->target_cmd == arg1) { + break; + } + } + + if (ie->target_cmd == 0) { + print_raw_param("%#x", arg1, 0); + print_raw_param("%#x", arg2, 1); + } else { + qemu_log("%s", ie->name); + arg_type = ie->arg_type; + + if (arg_type[0] != TYPE_NULL) { + qemu_log(","); + + switch (arg_type[0]) { + case TYPE_PTRVOID: + print_pointer(arg2, 1); + break; + case TYPE_CHAR: + case TYPE_SHORT: + case TYPE_INT: + print_raw_param("%d", arg2, 1); + break; + case TYPE_LONG: + print_raw_param(TARGET_ABI_FMT_ld, arg2, 1); + break; + case TYPE_ULONG: + print_raw_param(TARGET_ABI_FMT_lu, arg2, 1); + break; + case TYPE_PTR: + switch (ie->access) { + case IOC_R: + print_pointer(arg2, 1); + break; + case IOC_W: + case IOC_RW: + arg_type++; + target_size = thunk_type_size(arg_type, 0); + argptr = lock_user(VERIFY_READ, arg2, target_size, 1); + thunk_print(argptr, arg_type); + unlock_user(argptr, arg2, target_size); + break; + } + break; + default: + g_assert_not_reached(); + } + } + } + print_syscall_epilogue(name); +} +#endif + /* * An array of all of the syscalls we know about */ diff --git a/linux-user/strace.list b/linux-user/strace.list index ebb713252ce3..a04706a524ae 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -433,7 +433,8 @@ { TARGET_NR_io_cancel, "io_cancel" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_ioctl -{ TARGET_NR_ioctl, "ioctl" , "%s(%d,%#x,%#x)", NULL, NULL }, +{ TARGET_NR_ioctl, "ioctl" , NULL, print_ioctl, + print_syscall_ret_ioctl}, #endif #ifdef TARGET_NR_io_destroy { TARGET_NR_io_destroy, "io_destroy" , NULL, NULL, NULL }, diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 506b94a12c1e..82afadcea0e2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4481,24 +4481,6 @@ STRUCT_MAX #undef STRUCT #undef STRUCT_SPECIAL -typedef struct IOCTLEntry IOCTLEntry; - -typedef abi_long do_ioctl_fn(const IOCTLEntry *ie, uint8_t *buf_temp, - int fd, int cmd, abi_long arg); - -struct IOCTLEntry { - int target_cmd; - unsigned int host_cmd; - const char *name; - int access; - do_ioctl_fn *do_ioctl; - const argtype arg_type[5]; -}; - -#define IOC_R 0x0001 -#define IOC_W 0x0002 -#define IOC_RW (IOC_R | IOC_W) - #define MAX_STRUCT_SIZE 4096 #ifdef CONFIG_FIEMAP @@ -5374,7 +5356,7 @@ static abi_long do_ioctl_drm(const IOCTLEntry *ie, uint8_t *buf_temp, #endif -static IOCTLEntry ioctl_entries[] = { +IOCTLEntry ioctl_entries[] = { #define IOCTL(cmd, access, ...) \ { TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } }, #define IOCTL_SPECIAL(cmd, access, dofn, ...) \ diff --git a/thunk.c b/thunk.c index 7f31cffe0968..992a19b1c946 100644 --- a/thunk.c +++ b/thunk.c @@ -271,6 +271,160 @@ const argtype *thunk_convert(void *dst, const void *src, return type_ptr; } +const argtype *thunk_print(void *arg, const argtype *type_ptr) +{ + int type; + + type = *type_ptr++; + + switch (type) { + case TYPE_CHAR: + qemu_log("%c", *(uint8_t *)arg); + break; + case TYPE_SHORT: + qemu_log("%" PRId16, tswap16(*(uint16_t *)arg)); + break; + case TYPE_INT: + qemu_log("%" PRId32, tswap32(*(uint32_t *)arg)); + break; + case TYPE_LONGLONG: + qemu_log("%" PRId64, tswap64(*(uint64_t *)arg)); + break; + case TYPE_ULONGLONG: + qemu_log("%" PRIu64, tswap64(*(uint64_t *)arg)); + break; +#if HOST_LONG_BITS == 32 && TARGET_ABI_BITS == 32 + case TYPE_PTRVOID: + qemu_log("0x%" PRIx32, tswap32(*(uint32_t *)arg)); + break; + case TYPE_LONG: + qemu_log("%" PRId32, tswap32(*(uint32_t *)arg)); + break; + case TYPE_ULONG: + qemu_log("%" PRIu32, tswap32(*(uint32_t *))arg); + break; +#elif HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 32 + case TYPE_PTRVOID: + qemu_log("0x%" PRIx32, tswap32(*(uint64_t *)arg & 0xffffffff)); + break; + case TYPE_LONG: + qemu_log("%" PRId32, tswap32(*(uint64_t *)arg & 0xffffffff)); + break; + case TYPE_ULONG: + qemu_log("%" PRIu32, tswap32(*(uint64_t *)arg & 0xffffffff)); + break; +#elif HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 64 + case TYPE_PTRVOID: + qemu_log("0x%" PRIx64, tswap64(*(uint64_t *)arg)); + break; + case TYPE_LONG: + qemu_log("%" PRId64, tswap64(*(uint64_t *)arg)); + break; + case TYPE_ULONG: + qemu_log("%" PRIu64, tswap64(*(uint64_t *)arg)); + break; +#else + case TYPE_PTRVOID: + qemu_log("0x%" PRIx64, tswap64(*(uint64_t *)arg)); + break; + case TYPE_LONG: + qemu_log("%" PRId64, tswap64(*(uint64_t *)arg)); + break; + case TYPE_ULONG: + qemu_log("%" PRIu64, tswap64(*(uint64_t *)arg)); + break; +#endif + case TYPE_OLDDEVT: + { + uint64_t val = 0; + switch (thunk_type_size(type_ptr - 1, 1)) { + case 2: + val = *(uint16_t *)arg; + break; + case 4: + val = *(uint32_t *)arg; + break; + case 8: + val = *(uint64_t *)arg; + break; + } + switch (thunk_type_size(type_ptr - 1, 0)) { + case 2: + qemu_log("%" PRIu16, tswap16(val)); + break; + case 4: + qemu_log("%" PRIu32, tswap32(val)); + break; + case 8: + qemu_log("%" PRIu64, tswap64(val)); + break; + } + } + break; + case TYPE_ARRAY: + { + int i, array_length, arg_size; + uint8_t *a; + int is_string = 0; + + array_length = *type_ptr++; + arg_size = thunk_type_size(type_ptr, 0); + a = arg; + + if (*type_ptr == TYPE_CHAR) { + qemu_log("\""); + is_string = 1; + } else { + qemu_log("["); + } + + for (i = 0; i < array_length; i++) { + if (i > 0 && !is_string) { + qemu_log(","); + } + thunk_print(a, type_ptr); + a += arg_size; + } + + if (is_string) { + qemu_log("\""); + } else { + qemu_log("]"); + } + + type_ptr = thunk_type_next(type_ptr); + } + break; + case TYPE_STRUCT: + { + int i; + const StructEntry *se; + uint8_t *a; + const argtype *field_types; + const int *arg_offsets; + + se = struct_entries + *type_ptr++; + a = arg; + + field_types = se->field_types; + arg_offsets = se->field_offsets[0]; + + qemu_log("{"); + for (i = 0; i < se->nb_fields; i++) { + if (i > 0) { + qemu_log(","); + } + field_types = thunk_print(a + arg_offsets[i], field_types); + } + qemu_log("}"); + } + break; + default: + g_assert_not_reached(); + } + return type_ptr; +} + /* from em86 */ /* Utility function: Table-driven functions to translate bitmasks From patchwork Thu Jul 2 15:27:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 192275 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp1553329ilg; Thu, 2 Jul 2020 08:38:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkIIHb383ZXB/0epwjC69tewmvwg7x5jmM8CJVje0znyfrmuC7BX7COLKxnfPwBY9S6PHR X-Received: by 2002:a5b:d0a:: with SMTP id y10mr51534794ybp.32.1593704280129; Thu, 02 Jul 2020 08:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593704280; cv=none; d=google.com; s=arc-20160816; b=c+QeiwPbvA3IZ6UXxJVwqHYakjbgRqSu5zjeL1oDZO1uXLisInpWgV7V1Zkef7VBc7 aAPVsYTE+DoZ57v7XgXymw2fPfkRdCkE1f+M1pStOPwbeHZzIzHvJTvSaulkMETkrLLZ 6WP+vjLWjNW68TKoMp8upNJt76uikzG+jkqKF57SsA3wVCY5kabMcfvdlYmTfagAkG3p VwDwbM1iNPR0bKtJt+KpXi+AQ/H1lz6qHd1+h2QpCSKdFGMSGkpTVU8NkyxjvTRxVWGK YJpEGC5VvE6zfJrAor+xeIjckiDGzWmoYVNmGSgPOfFA4kqlaP0vb5gZepRlDFT+HjkZ bxlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=o3GRM4NdsMmA1n1g9ivdcI80g3X+Mg7b7clupkT/Nd8=; b=u6yHVwEOhdwdDw0P4q2oUWr3haPksLwjH7c6Yc2iTe2kBZPfIoLrZAHBHh4l7DdiRt jC4QAvXm31drXmhmAg/0Ca+Zb0uZq8/ZWiZ/qNnTtcis4u9Hi89jhDA7I07LtTndxnZt pS8ZtBpVjSKllO13OXJM0g12Phw0BK4rpH7PdF8jpcEs6ws0EuWS/alD+C7u+SZ7rG4u OtnmpvjcEcCcRRgkd/aIL5yKLksJ/EhACxuRX29qbf9ZGVtqKhiEX/ALEcdbklOqilo3 uHDYwx4AGAE5O7zvaCBdHrtBq1Ok10wugyIOE30dObCpDhgC4FKikUMwfELU0ki17QYY dhaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w69si8928070ybg.387.2020.07.02.08.38.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jul 2020 08:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:55450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr1Hj-0001fO-K8 for patch@linaro.org; Thu, 02 Jul 2020 11:37:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17e-0000mH-B8 for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:34 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:54709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr17c-0006L3-BL for qemu-devel@nongnu.org; Thu, 02 Jul 2020 11:27:33 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MBUVj-1jf9IE3rIN-00Cx8Y; Thu, 02 Jul 2020 17:27:22 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 12/12] MAINTAINERS: update linux-user maintainer Date: Thu, 2 Jul 2020 17:27:10 +0200 Message-Id: <20200702152710.84602-13-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702152710.84602-1-laurent@vivier.eu> References: <20200702152710.84602-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:lXhXPznCtWYYW3+WyUHDrGvvWVjzfXO6GQjA6wBzYeNZjV1tOYi uoDfny3oXNdUl5yoNsWkmyXphKn0c8P1sr87micitv6oFDho16LIgO/uUBM2b9Q0EVtXKa9 mCjvgxhk7mJDLPJULk4CiQWBdqaaZysMoUsQtwXDtM2ygrJSPTGAmiPUNPRPOgfE8Ca5wgW 6ZkNFZEwKo9yBADLBckAg== X-UI-Out-Filterresults: notjunk:1; V03:K0:THQ+ikUN7eU=:MjZMX6pFxd69XlXO7zCrLB womscvlv93L7pueBhjno0L+jHjkkym1t06gDJlRkf1eiKYwuk5rnNZCNSIxn9S7pci9BHbNWa QOk9rc2Zj39hF0JkkzTAK4B5lgRL+nGtzZglLOAH7rXiqE7aD1t4vHh5rO9ZL1rLp/A/bT8pX rbAa/oeRVetdKEg/pEo4Ngh6Z6Ex/oix5WehX1Mqfy4rfw64+pblsM8dg+0791/DLysv6CRrp IdSVaCvG+2YnOMMQU67Gp4An9G7HdzrY6TXjOWX09+gBe0LwYxRGWbzyJ8atLv2fSUaDrQWmr mp09pvtJOzjZbPPjKQprTU/HiYE3zoCN680ymkNX3EAnaZYD1tPCsm1C+Y/skg1q1v1QWLXL7 n9Ya036KVg5i7TzGwVPagMK+iJpv44S493nipBlrinQVtTO3xVC/2xhVo5NrplsTA6c/sbdlg qH/8jsv6OuBduAdPTpPQQD7oYev3FfSY0NjvwQxGg0EQuD5+LQvMZEx8bLYi6/NBnLDJU7zG8 g1Zw4wfAo3XA1XCoB/nV8SSvchZE5X6dSK+b/U0w7BkC7aJC6HlBdXDye58zSyGRKHK4oZM+c VCYwQUzCvVFxizk/mDCXKSuy85yFxDQh/1q5x3rrx2qwzB/Jod6T9DGeNQsvsbzxkZyQxE2Vk HnCrfvodJctpF/962w0fzRyNgcELMvVWdzmv3kTLcGsHXkp7sxtk00cUd2EyMnmazfnpzjjX3 lzPcqAq9iZyJTihe2wv0pIavqeCw87ixYjR/g8Uzo6qzuCnm+4fNeAB4F2q8gXLxQb5+BJuit ZyTJaeAq/jHToM7TUyvrxH/9EKmitVUQc8ylZleWCk/QvuJ4JQ= Received-SPF: none client-ip=212.227.126.135; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 10:57:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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 , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Artyom Tarasenko Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Riku Voipio I haven't been active for a while. Pass the maintainer hat forward to Laurent, who has done a stellar job filling in. Signed-off-by: Riku Voipio Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200702111636.25792-1-riku.voipio@linaro.org> Signed-off-by: Laurent Vivier --- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.26.2 diff --git a/MAINTAINERS b/MAINTAINERS index dec252f38b1d..29a23b6d3a5a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2629,8 +2629,7 @@ F: bsd-user/ F: default-configs/*-bsd-user.mak Linux user -M: Riku Voipio -R: Laurent Vivier +M: Laurent Vivier S: Maintained F: linux-user/ F: default-configs/*-linux-user.mak