From nobody Sat May 4 01:52:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1557472715; cv=none; d=zoho.com; s=zohoarc; b=jTwdqJ3am/JlK8ShMeDWBwRmUtN7AA1WzA1UoLhZREN4bpXep3wBHo/73MuApT3zj1q1/E7UmVMkKcpr0AV7m4F2AZI6c1uglORDqN/TnP6BA96mwUH3KiZ5KTxrjtBt3OFGK6ivUr89LcGKwsalxJ4mKcG1BmnGIJDYUguYaVE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557472715; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=A6GUx4qyb5VV8h6IdL7aV9h8sdGd3WyCZsf2NoOGQ2E=; b=SANorg8eYB7TXJx1E4gjA6x2hoMqMI9puVtPul4Gop1j+QZ/0Xu+WRlj5L1ftiy0TYDnfrgkm6i7fEn1ddJfbHP8dmY3P6VC+7E7DJVUty+QGdnxTiKw8/roX3zpSjh47SPpq1Wm8Dknz08tAMpsI3HfngttOReebevsiiX+Ibw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557472715955856.9131165569072; Fri, 10 May 2019 00:18:35 -0700 (PDT) Received: from localhost ([127.0.0.1]:38178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOznX-00077x-N8 for importer@patchew.org; Fri, 10 May 2019 03:18:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlQ-0005l2-I1 for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlP-0001iU-KV for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:16 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:47427) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlP-0001hs-Bk for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:15 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MekvT-1goYTp3cGb-00aj9S; Fri, 10 May 2019 09:16:05 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 09:15:51 +0200 Message-Id: <20190510071557.30126-2-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510071557.30126-1-laurent@vivier.eu> References: <20190510071557.30126-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:hErQGaTBbND5t7nJ/LWEJl/IglfzKsDSI624jFpB1FY/W+RCTan IBnBPvj4e77HNKYlOc+KT70s2rgqEJxT0X+sU0N5aZnT/RoKuzNoau3J9K7JxAEzPCmOk2O 5T9kUDPRklS8hjscapJUyujltG3Z8CGaxbr9fuT8Er+q/5FRs6ESBead6H5N/R7cYk0Ua9+ 5jv6fmgDI4Y0CHzPaYmaA== X-UI-Out-Filterresults: notjunk:1;V03:K0:tC5HB4Broy0=:/ykASt97M8pVIoX3m12re9 uKgv4XCcLxZXevzzG27NgAC4K/tgzwX7tvGWKVmABjPgCV7245fWwui6lUG7/rcURzm/gPhlY AIdc++H+t0r54HbYDw181WvaIn2FDsm92F5QDAPVaK4IN5c9kP58hnBQmUBLEUqAqnj1Uwzvj 86xYFkJMMCUdL8KCc/J65pzcqShOdRIOQ9MKK8meh1uXOE0L4gAk6ZlJaWQ6xX6x+Hdlmfzst lEePawuMmLUbAINAzNUrnjK0UuQDj0p2B1dXSXf2jk2Bga/JpaEcJsnsRCL/T+kYZ0TP9oQP8 le+IfZkQFcvjQF/VUjQ3cmn6nl8oJvNVwyqi+cwXXZm643MvGwY0fl1qMaXdzuwfbDa87hGQ9 B+1yptwluxh64id3vBh5XFIR7pcihVMlUGk9pquuYQOkPIDlZH9e7QnU62x1Ly7hbFcNKodl2 o3J6Be1fvsSaAnD6d+qjwLMBEMQecS+ROZlBnw1+tqyVKPXA06VbKy0c39rlCtY46cCT0+4pt y8v02oFG8ljRrt/qmqD98nQLoJMBl4EWns73aJGLKGDayJ3KZLsARln5x/2khJjWbhlkX/Yjo aQvNhiIESioJX1+Zx88oeDRRj4ZY+dZ+5N3kW2j3y2K4RxYGkLWG1eE9kfL3d1wwsEdB2/8z+ ud6i0KiduzpfotLndQ6XDDw3HZ20v1kTkjyKYX70NP0jm6EpeGPG1DFXxii/xLvGCDT5lXX1q 3kr4IrI5LvV1FriztedSZ2xSgL69aULF7nKFgw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.10 Subject: [Qemu-devel] [PULL 1/7] linux-user: Add missing IPV6 sockopts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Helge Deller , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Helge Deller When running ssh over IPv6 with linux-user I faced this warning: Unsupported setsockopt level=3D41 optname=3D67 setsockopt IPV6_TCLASS 32: Protocol not available: This patch adds code to the linux-user emulatation for setting and retrieving of a few missing IPV6 options, including IPV6_TCLASS. Signed-off-by: Helge Deller Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 96cd4bf86dd3..44b593b81161 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1864,6 +1864,28 @@ static abi_long do_setsockopt(int sockfd, int level,= int optname, case IPV6_RECVHOPLIMIT: case IPV6_2292HOPLIMIT: case IPV6_CHECKSUM: + case IPV6_ADDRFORM: + case IPV6_2292PKTINFO: + case IPV6_RECVTCLASS: + case IPV6_RECVRTHDR: + case IPV6_2292RTHDR: + case IPV6_RECVHOPOPTS: + case IPV6_2292HOPOPTS: + case IPV6_RECVDSTOPTS: + case IPV6_2292DSTOPTS: + case IPV6_TCLASS: +#ifdef IPV6_RECVPATHMTU + case IPV6_RECVPATHMTU: +#endif +#ifdef IPV6_TRANSPARENT + case IPV6_TRANSPARENT: +#endif +#ifdef IPV6_FREEBIND + case IPV6_FREEBIND: +#endif +#ifdef IPV6_RECVORIGDSTADDR + case IPV6_RECVORIGDSTADDR: +#endif val =3D 0; if (optlen < sizeof(uint32_t)) { return -TARGET_EINVAL; @@ -2358,6 +2380,28 @@ static abi_long do_getsockopt(int sockfd, int level,= int optname, case IPV6_RECVHOPLIMIT: case IPV6_2292HOPLIMIT: case IPV6_CHECKSUM: + case IPV6_ADDRFORM: + case IPV6_2292PKTINFO: + case IPV6_RECVTCLASS: + case IPV6_RECVRTHDR: + case IPV6_2292RTHDR: + case IPV6_RECVHOPOPTS: + case IPV6_2292HOPOPTS: + case IPV6_RECVDSTOPTS: + case IPV6_2292DSTOPTS: + case IPV6_TCLASS: +#ifdef IPV6_RECVPATHMTU + case IPV6_RECVPATHMTU: +#endif +#ifdef IPV6_TRANSPARENT + case IPV6_TRANSPARENT: +#endif +#ifdef IPV6_FREEBIND + case IPV6_FREEBIND: +#endif +#ifdef IPV6_RECVORIGDSTADDR + case IPV6_RECVORIGDSTADDR: +#endif if (get_user_u32(len, optlen)) return -TARGET_EFAULT; if (len < 0) --=20 2.20.1 From nobody Sat May 4 01:52:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1557473064; cv=none; d=zoho.com; s=zohoarc; b=evLEnG64atTbdQstMQaHKqzLDt8Ro8xk/nlp7vJ1XqpF/ysJhVIZLUkBB4rfQYiw+ktURjgLEvjq7gtOpdbFXrtRsli0eeM5Yi+MY7hkbAWuYuz73WRBr7D6z/2ol39ZmsEOL7eB3mv/t0HQOpbUvN8GOFp9n1mfd7pH1+mrtXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557473064; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=owFgQQmcwkfsW28LZvJZGD5xFRoxrgQLvr7SbOxjqgk=; b=eeTNTix8vC48TWdVtjrLvMt1+P0qP15inSPEdYvNloAEUgTGzGmTDKNWW/UAnlWiAQDuv4zE2hUvE/50Eppa8+EhYfn2s0DrC5PhKxdEPUEbi5P/rAJK92cq3Xuw3jkXfMfsKuVvKD4J2Oj1/AgLyyRkAi2AWgEOdBgLdkrkHFE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557473064641165.52147481203156; Fri, 10 May 2019 00:24:24 -0700 (PDT) Received: from localhost ([127.0.0.1]:38260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzt9-0003w0-M8 for importer@patchew.org; Fri, 10 May 2019 03:24:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlU-0005oB-0C for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlT-0001lA-11 for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:19 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:45747) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlS-0001kV-OF for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:18 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N7iKq-1gdL8x21jO-014nGL; Fri, 10 May 2019 09:16:05 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 09:15:52 +0200 Message-Id: <20190510071557.30126-3-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510071557.30126-1-laurent@vivier.eu> References: <20190510071557.30126-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:owK2vc3S+Zw1Nlmut8ymxmTtbgoD+kYzp7L9DFd/pAjXX+mxpyA pujHFa5TnhOOpW4ML+bDkADDLoF67o3xyGhz6oAabkjv5aUb7vpNkURYGtLAa84pNJQ1H7K +2bePamZRCfmTT/9ogxTsXwscjsdj6d8nFxu4N/REzfBHsapeMZGTu61qrfoSoLLWpc3P7L +A+TJLyoPrauuBAlRwMCw== X-UI-Out-Filterresults: notjunk:1;V03:K0:xaT1F1bhi4A=:mf5Ib+j+dNJwtuzChqNqVP whV1x85qqLQE3ZJmS/DUTbiGSKVMHIEsB899VmcdGf5cyMrc1qRQFmkI0bvo53vla+rPrOVFO N8AgOpi87NP4bR86r5cBzehGQj9ALDEhfMO+j1nG5vUiWH3DbkbbLmbEbPtj5qV5kHP0Zd0Uy VUiTXg2yEg/TabXgFV3jhcZCe6/gc2dWY1zfnPmaOOfQMVaY9dDLu7XpJCqkj8x6bJLrrjAmD Ct5j713YZ9tbX8rDA+HhJTzfR0/URyCvbJcjTH4XRiYPrugQPgVZVqUNz6xkwQpnYDaZceplD q6IK1JY92Trz86bhr6J/4ImWq1WBY30Ud0nPig53z75PpABVg+/qa7n0vZAFQLFM+c4sqHKdz okyaIVP/oNlZ6fK4XoKE+0PH2/LyP1PC4ISNwVwaCFc05hfAptsbGV0YtU1Z/3Obs7Mkstr0T jLTBI6cWcWYtQfIUQcEf3hh6cezljI95Sf5WqPFCMZftF+bMV8XKfMTkO75mTLUpA7x3bpey/ 7wb6/jlPATA3MCdh55Szuw6UH94ogOdwOIYtex4ycsj5TjMAndqd4RL6AJL45RACzvezbIuJM xfotMTZrjP+/xpcR9TSbD/3vLwovhigarKr+1uFuG9xmwMqnMPm9P+Sz0XYiKZWxO53PIbkP6 82S0bzCqGuxQzhe5CihpkSUciJ1+toWjSSjFocO+RJxtTTJ8jNBf54jiZlCqmBkzgrg0ay6dn zqqY3ADTm4OOfm0OjFW6u+F767qD9KK/CvHmffu7C0KzHi1ME86KyA5QFuI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.73 Subject: [Qemu-devel] [PULL 2/7] linux-user/elfload: Fix GCC 9 build warnings X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Riku Voipio , Alistair Francis , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Alistair Francis Fix this warning when building with GCC9 on Fedora 30: In function =E2=80=98strncpy=E2=80=99, inlined from =E2=80=98fill_psinfo=E2=80=99 at /home/alistair/qemu/linux= -user/elfload.c:3208:12, inlined from =E2=80=98fill_note_info=E2=80=99 at /home/alistair/qemu/li= nux-user/elfload.c:3390:5, inlined from =E2=80=98elf_core_dump=E2=80=99 at /home/alistair/qemu/lin= ux-user/elfload.c:3539:9: /usr/include/bits/string_fortified.h:106:10: error: =E2=80=98__builtin_strn= cpy=E2=80=99 specified bound 16 equals destination size [-Werror=3Dstringop= -truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__de= st)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ Signed-off-by: Alistair Francis Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index c1a26021f8d7..d08fe2346683 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2872,7 +2872,7 @@ struct target_elf_prpsinfo { target_gid_t pr_gid; target_pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; /* Lots missing */ - char pr_fname[16]; /* filename of executable */ + char pr_fname[16] QEMU_NONSTRING; /* filename of executable */ char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ }; =20 --=20 2.20.1 From nobody Sat May 4 01:52:18 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1557473026; cv=none; d=zoho.com; s=zohoarc; b=YDIHViaHg77lpqfPED03V4A8maQjaqWgkTnIVg82OZ6wXeqD3eoSEPb1cSRfkPZLtEGAglnkKJq2PzPQfxGwZuGjYsu4uyPq4dstvucqvNPMbfBIp+773B2NE4yPFAe7t2kBtVbSm2XbBN//5reVZo+0ulYG1jkcOMiuSWh+b+M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557473026; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=DfLTNEv2rNLcJy/Gi2YxgST0E3oC+JjrSb8zJkIZSVs=; b=ixYs3QgiLJ/3YZqOPTpnPcE5oJKSJFZ0kgSF2RJmHvWXLxsuyvY05oZ3t5TdRgvsE2+4YU5rt6ZYYtKpntQJNYp7Us+/CS6IjicqPks96Qzq1o6H4kKrabjodh6IsSzYTwuLE/InyJOOsE5Xo1e69npIh3E4ZHuTVsLIqU0+28k= ARC-Authentication-Results: i=1; mx.zoho.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557473026674623.8197168657405; Fri, 10 May 2019 00:23:46 -0700 (PDT) Received: from localhost ([127.0.0.1]:38258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzsR-0003S0-HA for importer@patchew.org; Fri, 10 May 2019 03:23:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlT-0005nq-Pi for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlS-0001l0-Tu for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:19 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:44547) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlS-0001kT-KI for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:18 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MPXpU-1h3dQ418gE-00Mcjx; Fri, 10 May 2019 09:16:06 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 09:15:53 +0200 Message-Id: <20190510071557.30126-4-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510071557.30126-1-laurent@vivier.eu> References: <20190510071557.30126-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:MmIg/GBEgOPrGam1T82sI5ZEbuQbmmLb0GqQFWMMcebxb5G8aO9 /q/4VO1vas7qd6C+B1nH8YojBViw+puG0zMG04yyO2aFYpFN1VVLis+UtbQpZAMdJBN+y3D GEqqwpWl8WJPKAVh24cZYJKHWkVBctGCq9E+xm7KIfDGP/MPNE7ApYCrFu6KTMAYQO/EBSi Z8V9Bdpim3xwmnzfNYWgQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:39ZglJTmz5A=:74csuOgxyu29sjQw6RrW86 1fIUhodlqy6do/obfo/WyhPxxFvFXrOE8tL8zz4aybr3xsTzo4hN48CBgRZDecdGaj9guL2K2 ARYnAcr6xzex5Flugtx91Jjyl/bwQFrpadXZFNQuq9UiBc/PJWsgb3/IeIzJJedsN/8WzgvdN My3tPI70wYfuA504ugbPOvlAzVyGprhk3O4ie5VFiaJ2iU9sl6Bp+bTl8n68LTZ0FxZsVlQXj 6LlXc5eo3gR8R+frVMAsovdnOGVrClrko1W7KZ/O6vH3uv6XggK0emW3o4iOQYL9PaZsxpxzp +48bRRGas6zI35HKE/LQAaL74wTv5auM/jSR+xfQDmOU0Gq+1Jc69FnsdkGBrz8Xd2jD0M46H b6b7HbPxTRWNKmfH3S702xPz/DRbzkz1pfF7ijh3NPGtbj8gM43VBQrSHGnisw3hr5G9nXLc5 hGZcQsBSFhB9pAOVcrD9Yol0cyqlVEpfd08n8P3BXg+jRa8lAbLamcw4sqGKSPjpUNzZ0eDXW hg59o/uWAgXzODRBsea4tB3Q8a8RvvtzhTRGN8r9W1+CJg2R76WA8YT8fEV0z7JrT1iMhEQl9 Do4/eK8yAdO3zPwSkKw8XFZ/PGcSxOqcTLlL9kwqv/MVsSrSmdzTjO7YzAIGeYsK6WDrDRy46 CWGAgZMFPGhMkC0SBj5IiQfa4iFlsdhF/BFG9UCly+dcC2xb3AJprFURg/wv2P0mUIfB6CkkE YZmBHdvHNOmI16xt01mSLJSe3QI9hlZSjc70unZ6iHP/OEhf37Y+/VboOUs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PULL 3/7] linux-user: avoid string truncation warnings in uname field copying X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrang=C3=A9 In file included from /usr/include/string.h:494, from include/qemu/osdep.h:101, from linux-user/uname.c:20: In function =E2=80=98strncpy=E2=80=99, inlined from =E2=80=98sys_uname=E2=80=99 at linux-user/uname.c:94:3: /usr/include/bits/string_fortified.h:106:10: warning: =E2=80=98__builtin_st= rncpy=E2=80=99 output may be truncated copying 64 bytes from a string of le= ngth 64 [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__de= st)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ We don't care where the NUL terminator in the original uname field was. It suffices to copy the entire original field and simply force a NUL terminator at the end of the new field. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190501144646.4851-1-berrange@redhat.com> Signed-off-by: Laurent Vivier --- linux-user/uname.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/linux-user/uname.c b/linux-user/uname.c index 313b79dbad47..1c05f95387f4 100644 --- a/linux-user/uname.c +++ b/linux-user/uname.c @@ -72,9 +72,8 @@ const char *cpu_to_uname_machine(void *cpu_env) =20 #define COPY_UTSNAME_FIELD(dest, src) \ do { \ - /* __NEW_UTS_LEN doesn't include terminating null */ \ - (void) strncpy((dest), (src), __NEW_UTS_LEN); \ - (dest)[__NEW_UTS_LEN] =3D '\0'; \ + memcpy((dest), (src), MIN(sizeof(src), sizeof(dest))); \ + (dest)[sizeof(dest) - 1] =3D '\0'; \ } while (0) =20 int sys_uname(struct new_utsname *buf) --=20 2.20.1 From nobody Sat May 4 01:52:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1557472886; cv=none; d=zoho.com; s=zohoarc; b=mHk9amFZekhT6I+nHepKuNFbmfYhQX47VcSpglhD1LZlm2cUZCsTHytOTAxPwn0XZIuRbN12tJuO73MnyxP+K73wsx5X2WkUNSPJB9eIA/OAgYzdTZLRp0powtBNbnQjGkgutwOU+ys1W+POdu+Zxs69zvaLx04p4B26HSSptlM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557472886; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=iTBMPNXs7zz67LYKAr3OYvNDTdK0P+WAcwqEvJXvkdQ=; b=R9uAFpzGbDnSMU/Hd/iV0HZ4G3dpmoy0qXYu1q9yuIfy6CYlMCW7tiUXT6Ua/y2pCbD9CM3SOlpEw8y2kMgBvNh88XJBj7pMKT8x06T8OTFsGBgM4G//GrlPgNSumfOOzxy9Q8CmPA6v5mNuMi/LtwFacZcqMmx3ZEox7YHxjIA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557472886460749.5213416901087; Fri, 10 May 2019 00:21:26 -0700 (PDT) Received: from localhost ([127.0.0.1]:38238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzqN-000127-8Q for importer@patchew.org; Fri, 10 May 2019 03:21:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlS-0005n0-S7 for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlR-0001k5-N4 for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:18 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:54283) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlR-0001ii-DY for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:17 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MyseC-1gUZiW3QZ8-00vxYf; Fri, 10 May 2019 09:16:07 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 09:15:54 +0200 Message-Id: <20190510071557.30126-5-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510071557.30126-1-laurent@vivier.eu> References: <20190510071557.30126-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:w4DiPT0rlpwkrUgcMs+GMeorSsNQ/oJ9Frm964ubNxmIn1O0f1W BXj45bxElxelYiqLUVq3KVTAhVDhO16HRaInuILt8qLeUKl6vJ/mHGFjo24ec+WGDxSTPV/ NKGtx/oD+5EGkfXoXWbg/nZILfkZaeouMq9DMAiJmsXg3VohTsLScWTANP4zDKSrmNzr1lG tY9ly58UuCFbuQhxlNZdQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:xdnVbWjJwlA=:q0YTd0qRepEjYvFFCgq7HB J0gHoXYhJkSqY8heN5mhreg7b26QLP4E67+7WHKg2UoGUc16NAiY73ufTmM1OSCsL5tvjUwWn JWAj7/t+mBBHJ+gzOLciw+mkjpa7zFFqFx6jHV81ckAra8LcKhlze6uoA3F+mG1sfNnvtx5F2 Y2v04zzKLsBkm2rlQ6wfk94LpcBsmnNMAxszQGyWOdz7IDWp+GTfvUckLaDmUBlF3CRNQUWqB kavNuC3cfIFxP1hPTemlHwBB3gmo//uv2/e70nw4UJAMLBGloBOk1bulYYDNeeGwoE3JgZB0i Nu3c/Mw0QXQ1qUFhXCAIxgoNFtE8rO1tjQmzB43Qn6qS1Dq+Roh3vKDI/ObpTDoHmy0Cocuq8 wr2coqdDXxkX4hn1kFAx//trUhTc/5eQjMTrQeCEuXcA1Q3/driM5xxN6lbzyRZ1SjWa8xxZz /zooYNYqOKCEuoy9DFZTQm0LxjVzgFH3b0u0ug5vGrkXG/oVTfjQ8mQiKhkx8LT5lDzfaFxPG T/fgVyG0qEUIbyLfXjbuwMtkhFid99nhgQ+xTvXRslBDYTHLdSU+KI3mnVMlcgntzWl7UkTYL cpyE5JOhROs87OTnO1pNsarGYK30rESwEnATM7sImUZRNE0Q8K8Upsf9CizxYuZcRdDXi93Nv p5SdK/wsNuZHL48hn4zszbZQxG7aPzFbwZY/e3H/xPQAxLlQFd3OSPYxJBXPgQXN2PEI8fvq9 hrWwz/yOfmu6rGiUDHar2z0mgwl4UCOqZnY76w== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.75 Subject: [Qemu-devel] [PULL 4/7] The ioctl(SIOCGIFNAME) call requires a struct ifreq. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erik Kline , Riku Voipio , Laurent Vivier , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Erik Kline via Qemu-devel Signed-off-by: Erik Kline Buglink: https://bugs.launchpad.net/qemu/+bug/1814352 Reviewed-by: Peter Maydell Message-Id: <20190423222005.246981-1-ek@google.com> Signed-off-by: Laurent Vivier --- linux-user/ioctls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index ae8951625ffe..37501f575cdd 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -178,7 +178,7 @@ #endif /* CONFIG_USBFS */ =20 IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT)) - IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT)) + IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq))) IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq))) IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq))) IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq= ))) --=20 2.20.1 From nobody Sat May 4 01:52:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1557472943; cv=none; d=zoho.com; s=zohoarc; b=HYssXX1CfC4eU6arsLIoTXkqaQbUm95PudiLDELXXidaiEttGNnjJjXkGuLdd8wkuCED0QZHceZZ03uzsIaH+1e7tHCWEeriYJv4nhwc5WgnPmKwVtq48AQNZgNsw9KRtSGLZVs3GFXdCOO1LtGYn1SoOlBApRzzfFiI6Fjww2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557472943; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=l+fqa713xJfUwU+gut6VEr0QDl2vUwTM1jq8FE4fGl4=; b=MfW7rHrHGOnTDxw7kpEjGEjZecP0wAOw5O0Tsx8VrzdiX3PiKzyLF5rMgyUurG41dplVEGQ8xx6R4ojmk+SLeQI94TJbJNQ7vj5bftcIeTnyR9fCVwt3Q9crgnZFr5SNKLJ16CaBLSLsfD4FOG6E+zXIfHQNnf23RgDQjmVor3I= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557472943539595.5163638049556; Fri, 10 May 2019 00:22:23 -0700 (PDT) Received: from localhost ([127.0.0.1]:38243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzrI-0002UJ-G5 for importer@patchew.org; Fri, 10 May 2019 03:22:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlS-0005mo-IC for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlR-0001jv-Jc for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:18 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:52555) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlR-0001jB-Ag for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:17 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MaIvT-1hAT2I1WKb-00WH7u; Fri, 10 May 2019 09:16:07 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 09:15:55 +0200 Message-Id: <20190510071557.30126-6-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510071557.30126-1-laurent@vivier.eu> References: <20190510071557.30126-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:h4K/Muix8nnOwDYsE8KmBPWIKOFAWv/R08FoTG5nkbPg0twbLH6 ts2MLG4HJ1ZvWs03fnf9VgPT3dijKAW2YyN0w7rgXLp4pY1C+CnXZZaaLZBz7MRN1ebK5dq GoxIiCSj2m4YdZJq+YIZiPhKugG+Hj2k31o0uNHhX5Hu3m6bnjamu6ybvzGTXUualvlpk25 jzNI6RHaMfPjCF0yZBBzQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:NSI+UmOAKto=:Xt4sAnAwAyhn6puOUhOoZA M2u/+iDSCiv9xbq6DgTqlguI4bbX7RcmHmCqZzwFUkqVZ0MmKGs5ozti1+GcqH6nB6Qixb7q3 D3hnYHpV7pDGUqTt2iPG6Bqhp/mbEolhpTuA2RdyofqWtoikIbqTBPyVDibS5rqBe8lvFX214 NgMSuw8NVU8nJ5G6cH58XNBzaNS+QWNCuMb5gLhPo0HH1xoso8dsuliGgEt61Z+pq0dr8hh1P YTWIeEt4I1omTQzeViPP+T7x3k3irqf9+m9LanWgrTxN8BqDcMUtMjRxwabyHwCN9sezGUr6B fFWt6U+A4y6mksvsOCBBiiCPANVAh6JO5TsSAj+uBis/pdVcxELdrun5hI+B195ja6Yb9aAnC 33UAoox80w8ck1K4cSlweiCZ8sIV8euQBZ164oZJrL9ZN6euYZsTZGDveDC/N0rq0Ou5AlEys zq4XAjPJE50AasaA4nzYee7l5VAMLR3A6skZlQxg026TZ9ZgJcTYTZHRlJQdEN6c2hPHOTOjV CfBIcbm3UoKTrwcnCMUdpo4rkmNKTxpk+YuwS2SIuFjUPUojhHVoef3grol3p9LNUgeLRaWXw 0VIIVH3njBuGKZ20BdbE5ARsnREd96n9EIZhjqE/eCIB/yzrkjK20abL7PRqOTFu8A8byIuTM KYZnqlDHbOCsfJVsnWB+zE3YPF52wRGK/gkVQ0i0I+O8LOCh85ivING5BmgB9X/tNf+tVRcB2 cAr5KtAB5bFyFcWuqUUqoVds2UNS/Us2Jru43w== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.13 Subject: [Qemu-devel] [PULL 5/7] linux-user: elf: Map empty PT_LOAD segments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Giuseppe Musacchio , Peter Maydell , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Giuseppe Musacchio Some PT_LOAD segments may be completely zeroed out and their p_filesize is zero, in that case the loader should just allocate a page that's at least p_memsz bytes large (plus eventual alignment padding). Calling zero_bss does this job for us, all we have to do is make sure we don't try to mmap a zero-length page. Signed-off-by: Giuseppe Musacchio Reviewed-by: Peter Maydell Message-Id: <20190503122007.lkjsvztgt4ycovac@debian> Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index d08fe2346683..ef42e02d8233 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2366,11 +2366,19 @@ static void load_elf_image(const char *image_name, = int image_fd, vaddr_ps =3D TARGET_ELF_PAGESTART(vaddr); vaddr_len =3D TARGET_ELF_PAGELENGTH(eppnt->p_filesz + vaddr_po= ); =20 - error =3D target_mmap(vaddr_ps, vaddr_len, - elf_prot, MAP_PRIVATE | MAP_FIXED, - image_fd, eppnt->p_offset - vaddr_po); - if (error =3D=3D -1) { - goto exit_perror; + /* + * Some segments may be completely empty without any backing f= ile + * segment, in that case just let zero_bss allocate an empty b= uffer + * for it. + */ + if (eppnt->p_filesz !=3D 0) { + error =3D target_mmap(vaddr_ps, vaddr_len, elf_prot, + MAP_PRIVATE | MAP_FIXED, + image_fd, eppnt->p_offset - vaddr_po); + + if (error =3D=3D -1) { + goto exit_perror; + } } =20 vaddr_ef =3D vaddr + eppnt->p_filesz; --=20 2.20.1 From nobody Sat May 4 01:52:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1557472878; cv=none; d=zoho.com; s=zohoarc; b=jWrF2LyKuu7ygdEMaqJC6gDmWUUqL5m7tH2KYhVQ3UA4vyVPx6cmSo2XdllkQUeBDvlNbca2gWZzEXcY1TNjraBUKw/akOgm1TSd7jDQykx8YAshA0/K1RjDJWXiblv5SWJzKwUJ7Zt0LLiAQ0cu04jbw40Saeln3Zr1Udx5U8k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557472878; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=BiWS2A+43k0kPne60VuhGRCku7PP2UduexnDqb8ezhc=; b=F6P+NmTCHu/v1aEfndUfbx/oSEDnwc2SgOA4PO/mKD+G07f/bwtMRYN4WIMeiwt5nZNgXA12j07SAVjj1DYM6+Gn+RR8+KGWMnS9mDLXPhMaAddO/WH4BtDRDbTu+9cmwCnIml3NT2p0S0PeW0dQpYLoFZaAR3bOtFEYI44z4i4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155747287857360.523570998667765; Fri, 10 May 2019 00:21:18 -0700 (PDT) Received: from localhost ([127.0.0.1]:38236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzqE-0000so-HF for importer@patchew.org; Fri, 10 May 2019 03:21:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlR-0005lm-FJ for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlQ-0001j1-Fc for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:17 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:36127) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlQ-0001iM-73 for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:16 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MNKuK-1h5qLV3Xj8-00Opf7; Fri, 10 May 2019 09:16:08 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 09:15:56 +0200 Message-Id: <20190510071557.30126-7-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510071557.30126-1-laurent@vivier.eu> References: <20190510071557.30126-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:hpNSk8jCFA1gGs/HUMOgsJ+gKep+ZKMO7Go9f1u9v+bd64gSuHe Fhn4mtwWDfPfWJcxVMpwuoYm+RC2x2HQ963dagxHtlgrSHDZrXnNXp34cUo1HD4sqOtzCyg jlLxfd3yCYix9zzdkUkKsmxdGh5xcVDNUrv8yIQBpbSg5wC5H092uDcbDyn7sts22W6FE5F q+zrduuayQxqbp9ii1nww== X-UI-Out-Filterresults: notjunk:1;V03:K0:+LoJWPF+eIs=:W9XGFgsfveehGrK7iGXTE4 xxAHNVumVxtkTyt04QT+1o3JWnRxhu+c2l9eRtluyseIunuP52ZdA/PlHUsk6eOeSxGZg1swF c+1AiLTAgIjWTpQMn9ss/rAJtfOAHDAVPi40v7egnW8lQRoqE+G2I9IgBCZCDrRnyOCgrndrx ioUDuwk9Xz3w5fKVZRLE/NrDUm3M5LVscIMqqXMYtg2G5l5fcTFXg8yDJmHRR4aV7nZC/ISvs aJjIdFrQkUT26IYAv6MgwKYG8BX3cYc0Q/gb71juagTng9lswdXVtNRYBZTXfiAlbtQSo83vB RNKihDzN8BOJotnKMXWUyVRhKYr5C4vv/2YqLwLU2muBLLyWO5qcWiYSV/N24mm7lR4B7xD4i Jrxj4VRVL97YkYrVaPB4zhu5c5uUX4bkdI/KMekKE0I4AsgGNhEPFIAGaf0cHBtYTFo6HbKEY q+fYx6arJN16A+r/x8LA9wEmIqx5Xi+WxzyDilaSAd9geIAFj5Wo7PWCosK+Ik7j7vqDR3Q9E YqG6aF04CiRhQ+Vxy6GenbPFP86I4M+/itD57E/NJvaVu9qSIlhsbbinRI++DiNkOfEO7jL8u AmO+cvbfj9+i+gGoPEvG+tKR+lDy5y79H//eDSQe/iZinWl86OHf2wRfVXDgwuRZcERvBZhAO t4OMSFZdRe95IktdY4uCraMyVl3f2F6v5OT0JarBn/uyPSFl60xDLV63fQrM2mTWTw4px22qN nqc4IFFw73Mrep4dKf3kKziSbT50+pHKq1gTmkgEDg0xx/XoxRLqypf6j/g= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PULL 6/7] linux-user: avoid treading on gprof's SIGPROF signals X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Alex Benn=C3=A9e The guest tends to get confused when it receives signals it doesn't know about. Given the gprof magic has also set up it's own handler we would do well to avoid stomping on it as well. Signed-off-by: Alex Benn=C3=A9e Message-Id: <20190502145846.26226-1-alex.bennee@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/signal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/signal.c b/linux-user/signal.c index e2c0b3717357..44b2d3b35a0d 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -508,6 +508,11 @@ void signal_init(void) act.sa_flags =3D SA_SIGINFO; act.sa_sigaction =3D host_signal_handler; for(i =3D 1; i <=3D TARGET_NSIG; i++) { +#ifdef TARGET_GPROF + if (i =3D=3D SIGPROF) { + continue; + } +#endif host_sig =3D target_to_host_signal(i); sigaction(host_sig, NULL, &oact); if (oact.sa_sigaction =3D=3D (void *)SIG_IGN) { --=20 2.20.1 From nobody Sat May 4 01:52:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1557472715; cv=none; d=zoho.com; s=zohoarc; b=S/soGqqbn3cLI94owAX97iBNJyZjqltJYtUY/X7ytRmtAZ3q6dYo9jBs3RxCYYUSksj/FEa3ZQ9irGDTXlAIXvGzFkPXDpbYsJxKIPh1chxKMYZ+z50zE/+E53kcI1/YjvXtstjzKFHtw9A7VsxtSMDoz/fT0ZgdebKO/KiPKDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557472715; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=iWtD9ZffYzuDD6U+PoeZ6pa5zyFC4QoWf8a0o7NKL5c=; b=PgP5BGKJaEpuAJWJ34s1mkPkTJUrbD/7leh1rznv9RUnXTJepqmXYJ6c+8lXNMrDQdkemTh4qknDngBDaGOc2RtKj1wUsu5TwR/VhPOeoRx0UrrLd63eEhNyYWXkOpBxxQ6HMtXdyS+hcZk3ghZtO2yfqYq00HbMUgbns76dakM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557472714890244.16807113506593; Fri, 10 May 2019 00:18:34 -0700 (PDT) Received: from localhost ([127.0.0.1]:38176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOznS-00072p-Pe for importer@patchew.org; Fri, 10 May 2019 03:18:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlL-0005hW-Uy for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlL-0001gB-4H for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:11 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:58619) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlK-0001fd-RL for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:11 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N1Oft-1gjefj1bUR-012tSC; Fri, 10 May 2019 09:16:08 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 09:15:57 +0200 Message-Id: <20190510071557.30126-8-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510071557.30126-1-laurent@vivier.eu> References: <20190510071557.30126-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:XzJq04w+5M3m2BSeE6X/5R7ET+xs+0l4O0ib+jrUACU8+B1n9xN J69RSVffYV0Tyt+Y0MewNajtzss6nVbO94XYCGrhhkmFYoMOc5z1GPzuaST4HJ5xTY0oMzt Ug1fTCMUIj8fGYYQc8f6I0TLMZ+56kVDVgaQERH1SKIyzgOcj4lUH49KWmnQKOjp86QfQpf PXZjUTmiUInV4x5p+1tiQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:h2wjnWxYZd0=:tlCZ9Szuf0tdY4wTA7ZyIP pHg33CnZoW6KFUqhR3J3CrfeKicCt+fGkh7UwYjvDZqwz/rUNO/MMLejzEFM4kBXW3dLGOvTl fAN2bwwteJ2WDVqcvhoMPGOssQeFcK+t7jGJrMTlHlRDqXmOgdPCe6IbkbXGsBotYUvMB96+T gdIXAEpQsk8xbYJzQ0lkGcTjdpOfJNXJ62zm5rDhlBn4Np3FGn5xAVDr6Otd80plB43oOtmij lTZNiufFC7UpQe02M9LKm7iQZvGIMohUWZFDbZ56k8RB1j0HIZ3VHYwnMF8qoEHnRJWoe4rcl TASpQHAZIcumem+0iquEeSPMWURO1PAuufbhmMnka6WbUOXCZoKJBAiP9TM+ZR2zTz3HLw5S1 EqIKx9RQus2YYc49stP1twXRjIPUIb2CyTiv39uoknyhVC9aTSskPzo+JiZaYTk/n63Uh/Lef wrq5/j/0M9XdKNBkjBSlKB8rBqBhAimQzduhaBPNdhc2IIKvfE+n6lEoEYzo8jqcni49/6ERh b2dW4X7uRdFbhAEwaG68orhqkucEJA5BfySujiXlj+6MC726MNp+E6hUnW8YBLNSvKgUtxKpS yDixn/kZ4V4mUv8bCBSsKJGBzcOn3MeWWm3O/PoZdCTPd2kVh5EobAbsNik5wKuWeNnCgHtVm iP4rbkN5FFcXB1VXleFQQD0xe7gxj89b36HHHro+zU762HABjr5lhW69vdooBoAZPcAJzm4sk KCK8jVopG+nvD+PFFX4qhANaPcguS3rIMI/MFL4Jzxzqzq8pkoLLtjSu3Vc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.10 Subject: [Qemu-devel] [PULL 7/7] linux-user: fix GPROF build failure X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Desnogues , Riku Voipio , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Alex Benn=C3=A9e When linux-user/exit was introduced we failed to move the gprof include at the same time. The CI didn't notice because it only builds system emulation. Fix it for those that still find gprof useful. Signed-off-by: Alex Benn=C3=A9e Tested-by: Laurent Desnogues Message-Id: <20190502092728.32727-1-alex.bennee@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/exit.c | 3 +++ linux-user/syscall.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/exit.c b/linux-user/exit.c index 14e94e28faf8..bdda7205532e 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -18,6 +18,9 @@ */ #include "qemu/osdep.h" #include "qemu.h" +#ifdef TARGET_GPROF +#include +#endif =20 #ifdef CONFIG_GCOV extern void __gcov_dump(void); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 44b593b81161..f5ff6f5dc8a8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -59,9 +59,6 @@ #ifdef CONFIG_TIMERFD #include #endif -#ifdef TARGET_GPROF -#include -#endif #ifdef CONFIG_EVENTFD #include #endif --=20 2.20.1