From nobody Mon Apr 29 05:41:07 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=1557485289; cv=none; d=zoho.com; s=zohoarc; b=hQhu4yHLelBL8R6UzTyvWfG0o7a5oVDpsf6M0MSCU/js2Pe+IGxKQRM1fDX53scbqGWJourCL+HcXNyWzkXxSjpcSihH+cd+ZJYDG67MABPlFQLgr7uYzXxVGYyiVj6awNPEIvwMMnlDwMW/hKtj/EOKMR3dSQAE8p6CN8BIHoc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557485289; 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=NeoKrKO73qiKP8LTsMLfHZYBxa6/4bDFxFUfVQ6689Lvqfnl/JUVUWhI2shKe8kxlsCQzgmgLrSLeTJhUmGbGT3nUdT51LnloAR3TcxPCjh/RMb5GILGyHDF9oiH0STkG6AWReGWdf7XQD5BRSbIBUCnHXzJ1kHhWBQIYsPV+78= 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 1557485289473354.91805179006303; Fri, 10 May 2019 03:48:09 -0700 (PDT) Received: from localhost ([127.0.0.1]:40952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP34E-0000KO-0V for importer@patchew.org; Fri, 10 May 2019 06:47:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP32B-00077o-63 for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP32A-0003UN-75 for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:47 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:36897) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP329-0003TT-V0 for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:46 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mkn8B-1h0CTq3NMN-00mIgu; Fri, 10 May 2019 12:45:42 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 12:45:30 +0200 Message-Id: <20190510104536.17483-2-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510104536.17483-1-laurent@vivier.eu> References: <20190510104536.17483-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:1cemR1IMCoutiFI0WkuqLwest01H/jxjryGQJ8RRL8GxmqvQtnK kE58QL5EQJqPqb5sc3WsmPgZROT/P8euEFvsAtYZnkRbfVxoPe4/oRytQdE5auFDlLe5TtF sN4HNOvH4kDLyne38fj9dIiwMhi2fiMtH6gBVArHTdujuLmn8WoJ2d+Wa1a6QnhnGiAU5aK +rUlnELk7pMR+nGcI70dg== X-UI-Out-Filterresults: notjunk:1;V03:K0:Kr8g74zSNac=:tTU5MkHXAAhPgICqCNTzzW AV0Q8FfHaVsnxL9ry33kc0IdRQlDe1VgS5kj1HmfvnMPl7cOsDG2ZIcNS5BGoV2hTeLiFca+y /wfLFMKv0q3hW+/BHUl7DK+DdpALe3TH5ziOesGDU537pAEdNLuX9XhZsdPiDaSXT4rs1ybVw OWNa6Yb3JRT03D9U5Gt1rZmCLpm2A4IoOpiwPLYtzkQpX4sOASL42R+a3sRmvSQ00w7GhON6v AmNGzYqeQNFvS75lLzDXJYXXFiir5wMSMhrz9n64RHODUBnhMMBKUjG0n4Pob6zipoEOEC9uO chL0hHbque3Cip+pJWMlRWipswtbKmv+gFWl4KM15X3YZsDF2gtLkGR57FC7KJqi5ScNP8KaA P800wJdiIgMf3QsfEzmjkd407tqATaNKYA10ADm93fR8U6bW3WOCi/kW9mMs59hQwpApCvMHE Wr7xGhk9RITp/xHLi3CsFpnPuy0o8YcHkYnWsx8/d68ogR4Y6R+LFr3lQlgbS9ZAZvQToSwbu NHFEvtEXHeUrxWWjGyNhsGlEtDPG/M8ROLvCPPZlxT/SoZYQdnDyj2bW5JJE6q+BQ+XANDYnw CdKlrW5PR8TnjUdQOa6eBNkS0G0sqeGtoUSB8Y+/8bTrxrUvyz0hURE+Ss0RR6BUNScZh3tmX EDc7lEqPz9+aK+3zG0TGYyimTC//hw1N/rJ7/aXxIX48P03pQUL7KMasZn67/gmyM5BFNcNtA x3adDLxxCXoWuYo4H4o76U2KVbV7wQkwbjHHHg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL v2 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 Mon Apr 29 05:41:07 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=1557485679; cv=none; d=zoho.com; s=zohoarc; b=B8JsHgYFFEz5FjYsxjjHBslYsphNgzDgP13agRsTPn6AHpCcgxj1JLL1r9z39RTjOS0+yt5oMPs9Mla95jtyXl+R8IcQsI/8G75FCC9M8qTkB+j4PXKshZ/FjaOO4Ib8153ykJ5Sfdtpa3M4Yf9ciiqJYGNghSOR6ryw0c0VHfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557485679; 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=CdiQljXJV711I/P1amJFuzcsUf3YFDv6G4Wy9g8pYWjBBMoVAifS8fQSdCJaI/i75d58fiA4sdblvWXhaa0wHSPZ4GsAjuw+/AKEId+5QeOMEm8L137YCqeDeAfNGWq7K9WDhm/w74psCtn8esm+lRtu+PproZNuaGXtVjO6GP0= 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 1557485679554529.9300839364454; Fri, 10 May 2019 03:54:39 -0700 (PDT) Received: from localhost ([127.0.0.1]:41037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP3Ae-0005oa-AQ for importer@patchew.org; Fri, 10 May 2019 06:54:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP32F-0007CF-3c for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP32E-0003Xj-51 for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:51 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:48533) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP32D-0003Wz-T4 for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:50 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MxYT3-1gVq0t3NyD-00xtYQ; Fri, 10 May 2019 12:45:43 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 12:45:31 +0200 Message-Id: <20190510104536.17483-3-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510104536.17483-1-laurent@vivier.eu> References: <20190510104536.17483-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:B18h2bbB+DvXy/LsGfaQGDwqnqdRjV9ivPqai/M0fqd84uX/P47 jwYv/rOJRgznf2CrQR/vv5QmaMFSm6U8YhB3u0ms7w6p6WyUvspTWCNUzylrBnOWewi82rw tKGIvSwr1+SRAROvHF1kB0Un78QHb1q+/VdO8e8/Zb6aDrqyP9Qczhp0wK71EQ4lAoPecXH iBd8J0GYzVbrsyaNNMD6Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:IfQqvT2QTQk=:dxB6v6qyZjcCCBdsBN6crE RsQkbGYXKbITCpSXR6oZhAZ0lHW5twErXvSyV6vPQN9eqpuVM4vBN3XnsjOpTvedYL8cMByOK sGpAYLlt6KLtKDbI1YVySJTPm2Ru7vLSiNj8yUZYOVSOsp0WqwptTMPIhURsics4b/Hw5kWQ7 N92m4nUs5xiPKrvyMqjh8Qusa654rLLEAWBcCLmp25hq3PZMrGFWY4FtZ4Ae+7gbIiA67XNrm zh2OQBvtb72DApweYlki5kpLbJxh2/17ySn1beHJjlT0BcP/aPQvVzttxH6x3h+zuGZ1KJDmI kJHKR2sSLtnrVjFlwaA8bRaBZcBnkp9GKVlmETndhRjgt6b+i+ZO40v+GiWC916Li1/YhS5eh XhBu2uVh9Z/0M7pkcHb1fTwG6yY84PV5U01a+abEjNrR97nC/ZI9QBeqFRCDTwsisszifcASo qRT0fRmO61t5kNPr4c/yhIYnLzRZo2KM/g2NXgx2nq7h9r8TZiazZ7Qli2ejKGPXbBvYqea5S DVzlAQhU7sQe0wmMcXhmmlOpWvuDR+B4scgQdy40MbFnjTTslGBzHAVo2WfkOvZACWuzxkfvm sbU0PGgvdnSN2ONHcA+3/aT/xraMWLVIf7NwdU0G17D4R7s66iXnrdkW/2FIunCgEq/HdbqQu 4IUFTnV+V1pOhOAspMwGcNVkWHsRGYXk5jGEDbzSPcPbmu9nX5ohqlapDw2r/eS9s3/GV35jQ pcybh9ZS9wbnGziBFmw5HEpTMtepQl3RQevUqjbfKOShRF5b2+Lgqt/ThuU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.134 Subject: [Qemu-devel] [PULL v2 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 Mon Apr 29 05:41:07 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=1557485916; cv=none; d=zoho.com; s=zohoarc; b=hWSeI4YhFNtWd/1lbbAYRKNM2G+qciPXRijjlpLmsCwAVn8SUDhtSKPbhU11BQwqO3DuDXIIe5d5DR2NgVnKP+ed1LltSRsp6XEYo6ERuCQoeibwd4VGKHlQHcsWlXnW0ZlE+1ccpgy3yDKjb/CWSOmFvSfpa42mYaAjVs89rsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557485916; 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=H+vZXIHBkIeHWmel6xa2zjnEQiJkOU+aSh1mDYuIazGsyFy17O1DiTnGYkV4H+dhor6EZMzG6OZYeipd4dV7Uj/zHet6r9yYVfakioKt+/vHdVZawVoUNB+EP0NJRoN6Cn3VOQLaflZdLXnKGMBKVH+enTxGClVQnzk0+qQrt/s= 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 155748591674255.50631681765651; Fri, 10 May 2019 03:58:36 -0700 (PDT) Received: from localhost ([127.0.0.1]:41100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP3EV-0001KY-Vw for importer@patchew.org; Fri, 10 May 2019 06:58:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP32J-0007Hf-Ba for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP32I-0003aN-EE for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:55 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:50657) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP32I-0003Zg-5q for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:54 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M1rGy-1hRFxX1zo0-002CQV; Fri, 10 May 2019 12:45:43 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 12:45:32 +0200 Message-Id: <20190510104536.17483-4-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510104536.17483-1-laurent@vivier.eu> References: <20190510104536.17483-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:zwCQFbEF2oiMW0z/Mnw23Pi0cFeUSvW5cM2E7CsUIGrKz7gFYEh jnJxELBGEr6sT1q/AWgWP/+/XHRs/eHkz/XfdCC4M6a37/BKEAqf7IbtqsVGOk7m6AFpkoW Fvgtj1QuJSbjlm3WrlfctRbPXkG5naS4sOxcUlRcbs6lom0YBQnk8GawoVoNuuB5jQa1KSF 4BHz0ekebS0Pz3SIqoJ3A== X-UI-Out-Filterresults: notjunk:1;V03:K0:UtHemGKOe4Y=:ILJzR47XEXM8h1R1Tp79MI ccdW5T3Hh6oFWR0aKyY67Big8cOhzmidY4sU+e18sStxzzYTBJ41gfNSm8FlYU1Az1K2cllVY DSL99F2VQUFznRTFEoZja3DwSlrAhn/aWTdg7kFJF6wJovBvQUWzKdCuliCrTSFdadCdrZSGu SW7oB9QlemKO7n0jEpGpbAQ5Mm5e+aPUYsHBNH1dMRoc7U89OBMydeZOP79cdpI4emFhHvmwP AoFTO/5fmYzPwURG/eLcSbjmLBhpgWhyx3NG4BSLJu1ed+koXAJY1uohadwSbnzoXUGVEIpPy V3b7OMD2blXf9Ob10Gfds+3cGdO/zXQSjFiOSsbvC1f74Tj9cEAKR1fvFW/HFgZH8hr8u8Yz8 GJ0hzU5u4cOeHuwHI6o3pCfOFUasv5jDRvYW66+XGOtGkrtJVkjUw69fjYHcSMJWITHTy0CuI R9COzPCAeJWPh+pCGRgwDDGAsGpI/AyUKphUC0vX0RcJ3/NKIs3Wlm8FySQC6vuI47t70Oacd c6R/IOWp1168qLCBvsljPL92TWBz/ReiHwUj0R93bnnkk2ob3xs5CLLthUXa1K4YhGqfc476N WpAxXxdOtwkSqoNCJd6A7HukqiXardoYVeaBUWIqZd/pC8O4ua54O0A8XAnuDH7dIxCfRHTmn t+8SUReSNheClC6+TvAI8MeiDqG3vg3U7FV5JRbosByCcCdEUyhGXPXpJS51/iRUiQ3+oO13g nGQrufji/X2w42BkNxbdoSUdZvLbdRToyCwi3rqfxTqtHLcgp774yc5cfyk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL v2 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 , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , 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 Mon Apr 29 05:41:07 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=1557485498; cv=none; d=zoho.com; s=zohoarc; b=J9WCrK5J9TSQEjr3aWOxAptv6D8CF/kcxn+pBFWA5ZLQBnFsI6qmC+S4Rp8GlOEr4lzizqrip2q480LxOqpRRorwZK3DhoOwu24lnkxEGV/p8uN6LAOhGYJ96BGtNITjGG2Bw0Wsd66EvpyMakOQ8bCzbIt8P8rDlAoeQYNdqSc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557485498; 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=sj6Xduw8ADpNjFeaNoCf9y4MFY9X9Jk9cCygKOiqGhk=; b=GMlj0KxC37G64Gfx9ZztJ76cgKRdh4niJwZO/wSueNXmk/hzf4HS91DT+dgrjdN7zsOkSf5gW1fdvr3n/GRuKDf4l7nl8VLV79oJYzAlZQYhK7k3sd8D5w1a6vF7QWwu7IJ/2G6BxbRKSPaZso7fwQDBc7gMUK7GL3PAkXr5EMw= 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 1557485498096852.7085036548675; Fri, 10 May 2019 03:51:38 -0700 (PDT) Received: from localhost ([127.0.0.1]:40991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP37n-0002s2-4k for importer@patchew.org; Fri, 10 May 2019 06:51:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP32J-0007JC-SJ for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP32I-0003aj-Rd for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:55 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:48531) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP32I-0003Zu-J6 for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:54 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N8n8I-1gcBHK00zm-015uyb; Fri, 10 May 2019 12:45:44 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 12:45:33 +0200 Message-Id: <20190510104536.17483-5-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510104536.17483-1-laurent@vivier.eu> References: <20190510104536.17483-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ubgID+gWm+qkyi2y6W3QMdWgDsJHIWHa875H6PHh3ZB3ovZMDgv 1D5YI+bD51iQBXityIq1lKQcgSeofIveFvxrV78wP/X2ip7EH0mBzsQI3lL1wXRFKtKedBK qEAnHkpFd/nPD1nkaRWHCqLRhTtvScg9jLRrlv24Fg5FZakWJ2UtY4GNZVCcMaJQLNJKdKw a3U94kxDx2YiiLfuFKHcA== X-UI-Out-Filterresults: notjunk:1;V03:K0:DehIOTSA6LQ=:S7Qy7G7lw1RXQuauAq0g1x PvJbzlZPXQdwlmmekuIK9WJEgQg0vKqaOVrgrffc4FC3LJZh72i8j+4whbhEfJP1Y2mo6iIel QKdlCNKZRXpluR6lyDONKi0hCAIoETXRpYA56gNW+bxcgCblQ/xLap/uwkoRdvo7NL53+241j DptLHagdk43ZKItbqxRxpIOO9SimlX+CVCqQmte/Mca9ErkHBUWOXFiGVMi++39HsuoSkYjM8 6jCJUPV3aawtmh2ZGeE2+mtTRDSq/7wutIvzdTilZyeRC+t6oMGIDdaykAvjQpjC7WZZ29zdH Xbbp4SlBR52qDApfqGbQuTRUUaQ/M9VsKmpH7YP4rQwxjIiFLmI70rKvr4Hj8DlYKY8sPPsJd wNY2SLRZ/b04YfRv34o+CQocNlC2L8QRs9xS/xTDHfRow2b9O9ZjSmHXh9bHsgYfquTD3K1P7 GCMAFFlWSHgS2CYMQDqtSwrHqLoTr5LbDg3Tj/NW3I9E0st9r7Dp/9wpn0Jlyv70tVXoV2CZX GV33kJVHf4+FbuGLGGuy30ewJDlZ8lmdq/uQu5G2LX7MIpsu1HaZ3+Dq+2PY5MPFFIa9eAFpg TXnYTehU0Gp878uCrSKXLKsiFVvU8xruYoXj1vLgVSxSb5+rr36RmNPNF+axhEyPb+ecVxSa1 oUXy2jf/LxlLEDw6ZQCmkhsfY+X1boW/vmfli49UZ4X7nQxKWwyg7hFF/PJ5oLmkoGcMPwtOb FmrCrnRqjDaD5rEzaK4orC99XoLtVE1CrErEbA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.133 Subject: [Qemu-devel] [PULL v2 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 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 Mon Apr 29 05:41:07 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=1557485503; cv=none; d=zoho.com; s=zohoarc; b=Yrc//qTXqb7ZtUKd9yBpjmOUgs6/J1t5mH5estUFs56MArGXy8Hy75G8/tOh1pbw6t5cGSvJSAdbmI3yB7k0TGgKZGvEOEw2V0x+V0g0HMupa+zyIZOjR+sqwltfYQOB0fO5c+gXrDM/yhLZRU9Pns0+4D4DoyEFTRU2AEHdhMo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557485503; 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=WjpyZmH3gmoZ4h+sXJJOzUWEBBMSbtAOpAR944n1rzBDy3308sgVpCZSQfZkuXIQfNikhehWJsKLXEQTv2Icxd26iYZlRU1OReJDT3Wv7XMseEmDtN21hyVG4AMc2zWErXiDe8dnFRRrCFv3gxOxgg+Z0k1pk+6ShVq56TRMlSs= 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 1557485503698757.505227364853; Fri, 10 May 2019 03:51:43 -0700 (PDT) Received: from localhost ([127.0.0.1]:40995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP37r-0002vL-Na for importer@patchew.org; Fri, 10 May 2019 06:51:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP32J-0007Ge-1e for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP32I-0003a4-4u for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:55 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:41519) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP32H-0003ZS-Sc for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:54 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MGxYh-1hTjrv2HSt-00E5T6; Fri, 10 May 2019 12:45:44 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 12:45:34 +0200 Message-Id: <20190510104536.17483-6-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510104536.17483-1-laurent@vivier.eu> References: <20190510104536.17483-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:XTBnFtqzqOl1augywSMETV/XokhJfZPtKFteLyMcMV1wCHIzu1r mtszKZUX+/G84uveq+tSFMPOKMNBCDu8ypqIPzOZqyJ71rvn1Q59lERCS9kmD6w2Zck7fTf TsSupJqbhdLY6tcTJbyBsw+UwEuNjkYThwY/z7oJaXNwx7sVl94XEz2cO7JrFmb6r2DVWVy UurXWy785I478K6kgnQUQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:glrErueLIBo=:iAXBGMbIdHKDVAVN4EYJK6 y1hvovHyjlhqRacqF14MMmWlxOBP9z68dPlhIB52fzBdafH6uGIn0q0OXjKI/IJVkbVKE2ifm Z8GIEfWHlyNf/kB51g/jdQgB4vkuRqWSRUtB1tbfcHJk/A4jWnlZAFpKm9CkkQp6sY3+StMGD gjMIZYbP0nZWeHVkLEQzZtdiP0mzHDfzboj86IaYkEwUXXixiGeM2Xy6gZ/mg6lqzfyXBIGKG 11hqwCreWGd0Ul342GjpG5cKMUkuHzCc55Z9IA02wnsb5uR5ZnxLK/sO6mDingSSJMqZ2N13c kIL3w8X5TmMAJg6kLpo4MA7XJsmuSIwAcX0faw8gbd7QuAwk9NBa4Om/F43jDCyn1Sw6NjPR/ NRWu8pjl/sYjtxmht1+mgvz0XS0K72u6R3HcYzmqvBRc6vkrdbLmv/fC65HmiBqjkLtbTPa98 px40B2LxHUEyr/i4ELNJkr2IUT8RmLaGL44p8sMdGmKWMCylK2ah2W5to9viSVchdTql2+vap UiwliR+jFIov0GYgfUi35dk11JiBbWoPefembDaIQUBZImJakzMXUM1ahqwsOas7EW3YzRX4a fEfBnUJf0yfRqWnBXdSto8IFWMpq+1LtdfNi7lICqxN6zm9JAf6G4eW8JUwV9WFNc46Ei1LB5 Qe5ufzrCddhGfnMoSpEjnY2/bvv2CXmHfrPH26FUSGHafH9EalCHlgnv26NgCi9Fai4XqUy2u gMR+IFi2jUGaPXX70xP/pCmHw300tGdAOl6wIA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL v2 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 Mon Apr 29 05:41:07 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=1557485494; cv=none; d=zoho.com; s=zohoarc; b=UPz0ou/18dkB+wJsbdP935lFT5t6MX3Nz9qcb8uhGO5Y1hGq9oxVcb0UU4lh+lruJeHYkYQoTdmkgFdYxClEI2qHOxa/5Ko9Et2cxdinnGXHAdy0E5mmewYZ9cw20+CYjnzssz/F/AoRGm7+L2CdH4DRteBOqRVCSQ0Te6FVpVQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557485494; 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=UEqrd3S3QU+dBCviytH6EmRcbu1shERL7VbpFtbxpEEnSDh+5L7B79qGtBMEO8GxQJ6uQMkL0kxs9hEm0s3QX2fu2v8A4TSlzxwU8+LMfbBQZ12azFBp2amr9L2YN5/XO1MT4IkPzmI5EbtxCejb5Bj19bPBf7wOEDDYPVquyak= 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 1557485494714572.4999735417005; Fri, 10 May 2019 03:51:34 -0700 (PDT) Received: from localhost ([127.0.0.1]:40988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP37j-0002mW-NE for importer@patchew.org; Fri, 10 May 2019 06:51:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP32C-00077u-OH for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP32B-0003V7-Ql for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:48 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:49353) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP32B-0003Uc-IK for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:47 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M4bd0-1hOUXP06vW-001fG9; Fri, 10 May 2019 12:45:45 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 12:45:35 +0200 Message-Id: <20190510104536.17483-7-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510104536.17483-1-laurent@vivier.eu> References: <20190510104536.17483-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:P0YC4i9p+55HDi78kXQ9LCtYjqHPaDZL+otsOi5KUhIp/yCpDfV N5J4vho4xHSiC6F2uik5CberFNieN+pXALZGX0PUkU2DFTXjGSrolBZR5rUHWP+L/fk+nMK uumd0klNDxn1XY8PreUx0j8spLasGp5UKc+5VmcpQqz/acamB2HIYz63ZIYexpCLir7wzwM k9uH16rrxHHCKM4VnYDJw== X-UI-Out-Filterresults: notjunk:1;V03:K0:iGIZFBUxNC4=:fgaoKx6VuBrOfekjOxLDDN dZUoBRFVXmZ+TB08ahXSWHou/R2izKTaGn02ybd02WTVbIZ9NkDu+NRcGmeO0NdAEpl5PHjl1 V1C+1MXO+jnbEsxx1OWSePQ8ZIkjY2F0f6/909SMwBPCGqmRsdjY6HxH5GPdLKWzVU9scq4gG e4WvqderD5cq61KVAnsgdRd557evj7kMif+Egddz4pecCoYaeQpGQRYHbNI2nLBHEvfhhYU8+ O8cafQctmGyzxWWpCyZQrNkZaiGyrn7bwaTs1vM0smxN7rc9BVcujKfyiS0aoDDCc3Uk7YbTo ccLdeNODm9VRwYirFZQZtn/+rHj1iQltH102s32wxrjI65S3WPWgurTDzm51ShJIawxu9wXuG GvOCnNHW9coMqxMVpTYWIluHcRyfqmR9x8cFlrBffWKIKpv926xE4dqnHePJLkYHcII/Pg2EN rloguQAd66S8pBDuvR54f/4XEUTXtoDD95/zHAirMbhkALn6fAFxpEjNjDcXqxFAbqOrvGyGU vOLUMnY5vmWKOIAqnmxXRaa5MgC/pfPFancQPuapjuhgVeq2VLQWerfD35wZnBSnbEU/8PVEc yMUgyFZsgkFWFHGMhfrGNV+8g85lPpY99N/wB2PeVgcRY+03LvJAh9aFcFqS9HNumKarEEDZL gBSMvZD4qnnopUXTZYRH+5YkRDqOxoZqCHJlvEPhQuC95W96uv4WEuM00W4qcGaN0iEGra11H cQhhAdwRiyzoA0Wbri42JTeZSV8qFK0qBYQL9Yci084ZHkX6MOtVNfizg6A= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PULL v2 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 Mon Apr 29 05:41:07 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=1557485295; cv=none; d=zoho.com; s=zohoarc; b=UYphDHkVAsLG+bIRP96s9VJA7jYhQGen4W+P16mVeNi/qXaClgjB2PHrlkPHL23rq76boUKCO/ZTIVDKBC3WPTddZtTNn7AZb7kNhYEBczwbrrKCRE2YNA+7BP6bFLO8nEFh//MSRp3ZPU4MKWjqNhSQkDk3bh5niUXkcPnDlHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557485295; 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=mwRa4Ov07WvT25qdtM6rn8RlNWQA44OlYuSxVqqPDQjk2k3Je49OeHjePLAhufvq1gjhK0c80XJpJB35Rvo9PS8n111Wf49eKEi5AkHziT2dckqsUS5C25MW4Q9KnoO4wAzEb2EW/5L2h0vB5LP2N4UQF3vfKZUELyDuZZ/O5j4= 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 1557485295349428.2655240902195; Fri, 10 May 2019 03:48:15 -0700 (PDT) Received: from localhost ([127.0.0.1]:40954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP34L-0000Py-8Q for importer@patchew.org; Fri, 10 May 2019 06:48:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP32D-000788-Kl for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP32C-0003Vc-Lk for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:49 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:44149) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP32C-0003Uz-DW for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:48 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MmQUL-1gyY3M2LI1-00iS8Y; Fri, 10 May 2019 12:45:45 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 12:45:36 +0200 Message-Id: <20190510104536.17483-8-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510104536.17483-1-laurent@vivier.eu> References: <20190510104536.17483-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:Vnp9sO9bsBtHY23Rv87ruW1IedEDylnTSw/JngGbdN+Sn+v5ue6 V+vY+jfX4MHALsCDR5+cSVm9jteOu4TnUaidu0wb7TGmOjJpdzoxTKuQmp4aZzEgCTMVRVI otWkieotbHPkf/5TUQcyOpglPAZFMJnUCErtN4u0Rk1k8jq6cOb0bDsPlqSJpcE/F1TLRsD Q+fhbx0p7qBnpkKUHt5TQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:ehbUMQwMp48=:lTlwX7co5kT9WRvo/BOo0I WgSoBguHeSS0rVG3VI91IKeekgoaM6d0sbEWZE5lZ0FXnGnaCbUqVBMmuYeIAvxEzOxrZ3NwG 3nD2crBA1+qz9v/RNEE3oUsA92t7IuZxf58EgEuKMT4aOA5mmXSHDeEEK9q3fBRSTwySFb5wF WEMC7gPFRpPi4nEtkaHsFoV7CYV67jsFqF1Bx7qolzn/6NsszqxzTJGOwRaNBL79RDXPU7zf9 ZpcA5Ld5EuJx/0uvw7zdVsyU/DaJgabnFlw/ImPLDT1Oy0SkqhHlG1VrrQwsJ0Ir5gY5dnTlF W1E0zCqTYoarhOvLXyubdSASFaf6MPQXHhj/LuYRFfxeEHQ2KaOvEWO0irC7ru5fIBAoiKw2u 9nE87HQNYjvb9JuajqOOFeKlXmjmTKIS2aaqjB4LuesSfExUvTxlxg0sZjEyuOCxm6NsN8UNm TVnpe3PhhuKc9xpVGn6N3dxui6uy24KxWSWrn5jMdrNxhR+ESyASN719BrYCVu1SrpwLskeU6 Je+SnPamx5g4D09O3wKkKLVuXiuVsZlZ8DTmdCX2o0Mh9rWy7I3WKQZDdeZWTKRVj1CbwnmPe T/rwVbR6a0nwbCwsEKKc1Z1+4g8x3+tMLf2ZUcOAe/1iu+mhdc4HiK49rW3Q3pJsfB2G2Efds 3cc3UwkBtaTlsCg5TYgPIKgV9/HULAU+SDbM72pHOkg4DKkbsbz1vvFq2kVG8AkSvjZ3P6C9A u1pRWJ9kThY+vbQa1iLor9p3mjsUENQA6CbwqiApyPZiR8ZyywBTnKxXklg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.131 Subject: [Qemu-devel] [PULL v2 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