From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487258734247940.825652355461; Thu, 16 Feb 2017 07:25:34 -0800 (PST) Received: from localhost ([::1]:47314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNw2-0001DI-VZ for importer@patchew.org; Thu, 16 Feb 2017 10:25:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCe-0000Zr-1K for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCZ-0002IZ-1Q for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:36 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:53232) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCY-0002Hh-NC for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:30 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0Lx70L-1cKAaY24zp-016jVD; Thu, 16 Feb 2017 15:38:19 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:03 +0100 Message-Id: <20170216143816.2384-2-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:DvI3rnVWIYJMG2ljGWnwaIskj8faEBUr8ISRiL1JM7Rp+4xSZrU N3FmqyTHjfC2rhJaPlDIA5BjcH+ccdI0UYiS02uoUAA1Kfp4iSL23NWLVyUbz+arxVZGt4e 24NTIVw2XpwPWO6nzt+BVPlQP8sBXxmGoYKNpWbIpFPGoy29eG9UCU3BsVo8Jc/7+a7Vzg5 ecQSuw4H3So701WQcsDTg== X-UI-Out-Filterresults: notjunk:1;V01:K0:+0z4f2K16fg=:/H5tzZ1HaeNYdnVQFupeY0 CbGfDV3OzmIQZ+RYPXIPS9QLd7mXCjrwiEQ4jyfH4R7fB/XOUxVA2BLNSvVsK9j49Y4yaxUb0 t5VnKX5xLElsNF+FkuO7coK11r6idWWSl9bkKRx7Zr+BkRNQRQFHkC0xoqhvis24nDDfQ6Yui jKKHDK2UWzwPv2SRY1a0KyZyJnGmusTPp4C75gM+mXDlXwRygK/Hhiy3eaw3yBCL/qjA7FEa8 1GmqeHqN4nEQ6RTu691apVzuFjE2oMrTlQwrT5jBsYvKSs7tJ8XfCHLSf3mxdsecqM7EdCkYS lEIi7st2EvDUwA+hB/Gg8Vwrem3G1xH1FFPAzXfo1V4q6BP5SSyOejkeP8VtYRXgJ/tfxd1iZ 4Pk+knlNsJPrh8Yj1efeS2zt89LAhdFckf/KqYB3ss8T40GLrVz5W6Z10wFa4FrLskBl3t95k MvZzxza9noLmri4cf5R+Mp70Esdob8YLHJfaLvYASLDVYHH2/Q34aKWiLlx9+/dc5JaGnShx9 UctlakxEDGfBC3syuQ1YVP8myUSaTB8+rjPO5Ejt65u6RdZQhjPTJomoC4vi1lbRa5URcp34B CGuFY4KtMzj4fV6tUrn5I7g4czma+BhfKecczragC3mpgA5g2i8QI+INcJjZA0FQry95bo5J1 xrOGmUr0YxzdGrzx1Gi7JnljR5yKHs6YhE98RVBpArlEk1kOVa/0n8yoY59YvDgDrGkE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PULL v2 01/14] linux-user: remove ifdef __USER_MISC 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 , Riku Voipio Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Riku Voipio This preprocessor macro isn't set anywhere. Remove the check so -strace can show these options. Signed-off-by: Riku Voipio --- linux-user/strace.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 489dbc9..8fb1b6e 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -90,10 +90,8 @@ if( cmd =3D=3D val ) { \ output_cmd( IPC_STAT ); output_cmd( IPC_INFO ); /* msgctl() commands */ - #ifdef __USER_MISC output_cmd( MSG_STAT ); output_cmd( MSG_INFO ); - #endif /* shmctl() commands */ output_cmd( SHM_LOCK ); output_cmd( SHM_UNLOCK ); --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487260613441191.13835893314229; Thu, 16 Feb 2017 07:56:53 -0800 (PST) Received: from localhost ([::1]:47495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOQO-0000cX-2I for importer@patchew.org; Thu, 16 Feb 2017 10:56:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCo-0000kj-As for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCl-0002Nx-AU for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:64170) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCk-0002N9-W9 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:43 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0LyDzx-1cGsnp2fI5-015dZn; Thu, 16 Feb 2017 15:38:20 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:04 +0100 Message-Id: <20170216143816.2384-3-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:upEU5jzjDPRuItT8CPAejnMFj1t4cFOSHdnUfru8H81KV5/+v/V HJZaiL1a/sfJgldjn3immtav7bPTHZNuv2hPceGPNuXwcO8qohHvBc/1GReWPtd7An4KghK 6UAv2E6cVyt9Nj9OJvQTIjjlmOJjXUJ2HJNfhiF5CSh8z/C5XF3kRevsFaTMuURQFUOrRf9 YtU4z1JWtU4w1iRw+z2nA== X-UI-Out-Filterresults: notjunk:1;V01:K0:oxIPIDtUdtE=:nnWi/n4/8QnnxRjpaKm56/ JpeA6xcfSGBwQynUNtHL86hOOvbXrd14MVe4q7u3psQ4Lo/FTxlCtxB4imZBFphmGgyBLZ3oc KUas/7lGnWSRpygp6DhrtW67HdbMIcTZl8ogACQcuGORZkLugN60cfIv/XbvkOXWZuPWCp2HJ TfVDZTzcaXw0JHaMZbO6pALg1XvIAT4Gq5XO3yF1UPzHaCwfW2wRpDVfPhYtFhROa54x+IaPF kGefB6FI8RlIu7be5l8lxPoRcL0jjJu8eo094N+MfFDERn/AUB/idk11owIfF+Nx2Y1b57Wpv DUnLz3rAxTC34HR27Az1qzReAo4jD/I3ncKIIEnWD/buEkb4ZqBgkxUROmkiHR2U0zZRe3rMO qkC3PulqREBUBZER+dvxKxUGjRrOroYFDbeE3HMwfkkvifTqpY4hQA5AgVTSyai+XixW7yhv7 qNVnm3ebrrLGy98qkiSTw34yWz3Bz2xXiI0TW+a0/1XRKMSpHB9jqKmyUngvFbrPkYXcFvB3R G0vGFGiwHi9mOm1Dn+TwZ5XwDoZrImgYgYNqGCuxQEqFRfj4TlcCjcXrF3xEQTTH+KTcdj1LZ aYk3w2QyXalPTmdYoyjhq+uNnjx2uG9PAGmjuu4chy31Ki4tPVBJ1P35+iaTvNRwq1OTU/vdZ QR6r0YlWCkWyAiliO3yIMQFS+hWpTP7nAZFDoUQohr72LNl4ZxWBQIgqTVoJw5L1LsUU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.75 Subject: [Qemu-devel] [PULL v2 02/14] linux-user: drop __cygwin__ ifdef 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 , Riku Voipio , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Riku Voipio linux-user doesn't work on cygwin anyways. Cc: Richard Henderson Signed-off-by: Riku Voipio --- linux-user/mmap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 61685bf..4ed9cad 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -193,9 +193,6 @@ static int mmap_frag(abi_ulong real_start, =20 #if HOST_LONG_BITS =3D=3D 64 && TARGET_ABI_BITS =3D=3D 64 # define TASK_UNMAPPED_BASE (1ul << 38) -#elif defined(__CYGWIN__) -/* Cygwin doesn't have a whole lot of address space. */ -# define TASK_UNMAPPED_BASE 0x18000000 #else # define TASK_UNMAPPED_BASE 0x40000000 #endif --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487261678689169.2137702611019; Thu, 16 Feb 2017 08:14:38 -0800 (PST) Received: from localhost ([::1]:47590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOhZ-0002gt-FL for importer@patchew.org; Thu, 16 Feb 2017 11:14:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCs-0000pt-DQ for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCo-0002Qq-Nw for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:50 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:64401) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCo-0002Pp-Db for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0Ls9Sp-1cFFB417eh-013xor; Thu, 16 Feb 2017 15:38:21 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:05 +0100 Message-Id: <20170216143816.2384-4-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:ti0rbuvfcyLRKxIKeuTEwIHxYL73UsyC65dYr3wzt1gO1LBOk8q JR8FccXO3D6oteClTXZGjHRqqtH96J3aubKIgsSxOfTM6LPp+OkH0BOiKWYvIs29kOm7+R+ ocUBLjebX5MTX/WBNDfRRO6/p7vAaLwQ2m+6EEGagpRHyTY36amhnLUO6ZuNUqnGWG6L4In AQy7ZxBan9h7R0o5SSQbQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:O1zNJYknd5Q=:zVryqU4KHjlyHq2dfeHaa/ UA7gvMjoUU++LFKCJS3F5Je5jG8L+G74WI5YoXADm7qjfP3YaCQYc3NCvfu/naVxr7ejpojs0 cFAmpV5o0IeXYaSq1shYl32eJZBWhRYssl45x0YQMz4jImxoW3nZvLALsdsSdqVBuFHOlRmvu 2TDW6w0dtkULZhsL+HWSPFjNY5d1sJNKewy/gST94SZyDQZCRD4gRLFIwe4Vq3agsCo2r2ne9 qXj6FWAt1MsHHnNamSTQdLw12nOxwH2ZlVbw1rtxh3CNrQIs195gIWPbXisVogexhQsBGL/Ih uqOFzqwhgOLQ+ywm3EqnxKxzrHhhwwflT7X/LXFnabJ82A9HnIgvRpmxRHqb5HIW1721MoqbT NI4QkqANROEt7/jQaDr3sZuMpcwmF6VmpTBWucl+n3Q/pZvTxtpAlgu/xXkhmCx98O/1cmr/8 dW756SxgWw865jxkMosV6evZrsteUV/vwy1hB0mmioEvFMojOZQGwWuavEwknXpJK+0VD+YOS 4YNxFsrNOrou3efHg+yxgi3/5ad4II7J5TxYdwbTqhhuXR80KGVzkmOovs4fwS3/yZYduAhBP D/Kjw4XbQ6hTMPiDKlraN0Umi4tjjG6NBACNrNQz5ITHvWovKcIKqTM4A1Oc8GPtr6hpgZD2H 4TwMkZfLqFKmXfiJOkAhFD8RjZ1gtEOK1FbPz5Wp3ULmdi+U177BHwxLd7CiZBx3IBtY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.73 Subject: [Qemu-devel] [PULL v2 03/14] linux-user: Fix s390x safe-syscall for z900 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 , Riku Voipio , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Richard Henderson The LT instruction was added in the extended immediate facility introduced with the z9-109 processor. Cc: Riku Voipio Reported-by: Michael Tokarev Fixes: c9bc3437a905b660561a26cd4ecc64579843267b Suggested-by: Aurelien Jarno Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson Signed-off-by: Riku Voipio --- linux-user/host/s390x/safe-syscall.inc.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/host/s390x/safe-syscall.inc.S b/linux-user/host/s39= 0x/safe-syscall.inc.S index f1b446a..414b44a 100644 --- a/linux-user/host/s390x/safe-syscall.inc.S +++ b/linux-user/host/s390x/safe-syscall.inc.S @@ -72,7 +72,7 @@ safe_syscall_base: */ safe_syscall_start: /* if signal_pending is non-zero, don't do the call */ - lt %r0,0(%r8) + icm %r0,15,0(%r8) jne 2f svc 0 safe_syscall_end: --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 148726143110552.38633213909475; Thu, 16 Feb 2017 08:10:31 -0800 (PST) Received: from localhost ([::1]:47567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOdY-0006SP-78 for importer@patchew.org; Thu, 16 Feb 2017 11:10:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCo-0000kr-Ba for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCl-0002OF-JE for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:55069) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCl-0002NC-9P for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:43 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0LbrfA-1bv6pW0pBk-00jHF0; Thu, 16 Feb 2017 15:38:22 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:06 +0100 Message-Id: <20170216143816.2384-5-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:rNnkzzgGZ9a/iKw+XLpCPFjIlG5DpvQsyNnh7w4HtJidwG1/Apm N0Ud83jIP5nMDH3Esf2JGY5yYGuzTqBB9dCdsjN+9KJhQy/bwJigyFyUZXelLNJC77y+Zz8 h0t1jFgmv8QFeDcpJwlIpA/CbXMpD9+e02ZJ4LU4HdB+Oevph4ryS7sOCXUd2otjVpH74Za viNv5mQen+q/SRsuKRIgA== X-UI-Out-Filterresults: notjunk:1;V01:K0:+w3qdrtLiB8=:GNwPzGmBYZoNemdR2i+ATl TdCYjZ3GuXsLFGD5pKJXen1jsLUFdnZ/B7RaCGVYu8l+MfUzFMa8BLh/oVi+KGxEca/Dn8cmS TDIdAhFncbjQwy951w2ZlmEieBBn7YfB6JkiFRKhDxNtO5DUo+w3Wz9rbSB0PKEBXarkgToNg ITM0UM4PgX5FXoZs9S0g3FpkklMG3/kt2iSNVy5e6L0NpFJmM513gncrgw0DIP6F4AfwoQlhQ PWEd54TNpNOfS5xPiRUDF0zCr1iXFmxiWOAMJlzBcclNRXPN1B1Kqw3n6tdWHeGTAQeuWj1ge yAWGX/5ZMFGD77dyVEjKA0heac8H08qoHE5F+5MSr1ARWLWxgqUrY9+EcNG/MmzYUW9oS7MxB yJLrz2OIlKtcqX415WJPvJIypT/18uJJ9FXoCNRKERlWh2sOMph5rIUQd/jn6xxZ2NDoLkd3m tXYYrefqe1Xngqy2kpQuAJiYqEYp/WXnBhIYbHWG4aw5MhHAh4kYA5RUJIPXw2U25EKnJg1DZ eMA1Kj3j0UVk08E0t5JmRwRrlB6F9MY13gaB3c1r9y9sJmfsI79eMCH4Q4HC4FuTo3oaweECh ggljk3+rkiPoMlLo2KhGzhSD9hZ/VvOI4uiK3iwJlqtNQjGHovhYKe41AZzasC3Kwe5wY+a0a OnCgrU+MtMzcnJxHAhHUrJXRnA+JU31IOGZ4voiQgP8mmVdOU/6/3s/a09V5kvazhIx0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.13 Subject: [Qemu-devel] [PULL v2 04/14] linux-user: Fix inotify_init1 support 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: Lena Djokic , Riku Voipio , Riku Voipio Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Lena Djokic This commit adds necessary conversion of argument passed to inotify_init1. inotify_init1 flags can be IN_NONBLOCK and IN_CLOEXEC which rely on O_NONBL= OCK and O_CLOEXEC and those can have different values on different platforms. Signed-off-by: Lena Djokic Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9be8e95..fccd631 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11561,7 +11561,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_lon= g arg1, #ifdef CONFIG_INOTIFY1 #if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1) case TARGET_NR_inotify_init1: - ret =3D get_errno(sys_inotify_init1(arg1)); + ret =3D get_errno(sys_inotify_init1(target_to_host_bitmask(arg1, + fcntl_flags_tbl))); break; #endif #endif --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487261983755443.53387488816793; Thu, 16 Feb 2017 08:19:43 -0800 (PST) Received: from localhost ([::1]:47617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOmT-0007oq-9H for importer@patchew.org; Thu, 16 Feb 2017 11:19:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCq-0000nU-Ew for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCm-0002On-4s for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:48 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:50981) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCl-0002Nf-RK for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:44 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MAdid-1cY0U13O7n-00BrlJ; Thu, 16 Feb 2017 15:38:23 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:07 +0100 Message-Id: <20170216143816.2384-6-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:hqM5z3WaWAvuS6kqQxAdEfy2obdTc2GHi1u2WzQdsOxuEQXs8sw tiBLEGuwseaYLrJ4XJSKzBrhZbx35Q4AIaea/tH+Va43dOJTS4rH25UxYjC3CFAKpw1S8pn BHywgXscKnEmfBWAkjezFQaQIRa4zfjbp9/O61z8GbWnHHTPmFyPKuKvXYrKcvbDL3ClI0U uEEKIjLJCLVQfx96i8NhA== X-UI-Out-Filterresults: notjunk:1;V01:K0:OYXiKgDfB3k=:KD9QiXDDJsPDuaLkqV7X3h V6l9G5bUsUp08n4yfhFfDOKICmG/9Le2VJRL0kuY1F4JuZE3WiZlvi+UP/JgIYFw/JftYKdfn 2hfNiOe4F5fwwElI5UdgRonILpM1GSaLoESR7h+Ph4DM+L6wQM/Dsp8/xlCPXUnR4WWkn5zQs o4vdBIoEsF38Em6AA0x4fCKURXzI5OQKDKa9qgz4ouWqLLMXFhCDlg8THqHwKFkK2vBfu1BGc pT0R0oUuolMJF+zngzzHnAvUzD+bSV2Xusd0PXTQ6Xz36GpGOxjLriDbLAi1jSeABEtdfXgZW CLeKPe97An0kUZp4d3nVaJY0Z6d/kAADB5B3fLErOKDtHbIEOr6OoHTjc4Y0W0wlA/lWFf5ug Xy6kpoBKHIMKFEWq4heTRaPziIcE7my6TMyYJl7th/b2kNA7uFtPk5XKA0MVSRE1lbw3Lvhwa If1CTToZdi0s2VRNU0FTW2/83XeT+kkD0XA9Tmg/xZyjPqaB+SO42XGbZhPG1Fm79p8XMTtSd oKS/P7BIUOCFpHaKrB2GAKpvcIFiMA8WVxbg+OQ0b2tYMA7MmkvuRBQ1EjxwZDF1SJEOYyemb VttkFw8jv6n9SIf9asD8NY/np1mnodpd9+QHhqRw6Xln5qS8V4C7Svs8mRW5JlV6apRuMvvf0 H1KivrJSBTVUPNJe40jDFnFggEJdQ2NCLx0iJNh/avADe6vilAxiK9dUAids3C5R6RiY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.10 Subject: [Qemu-devel] [PULL v2 05/14] linux-user: Fix readahead 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: Lena Djokic , Riku Voipio , Riku Voipio Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Lena Djokic Calculation of 64-bit offset was not correct for all cases. Signed-off-by: Lena Djokic Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index fccd631..3e88dd1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11228,7 +11228,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_lon= g arg1, arg3 =3D arg4; arg4 =3D arg5; } - ret =3D get_errno(readahead(arg1, ((off64_t)arg3 << 32) | arg2, ar= g4)); + ret =3D get_errno(readahead(arg1, target_offset64(arg2, arg3) , ar= g4)); #else ret =3D get_errno(readahead(arg1, arg2, arg3)); #endif --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487260870007880.7485193737239; Thu, 16 Feb 2017 08:01:10 -0800 (PST) Received: from localhost ([::1]:47518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOUW-0005P0-QJ for importer@patchew.org; Thu, 16 Feb 2017 11:01:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCo-0000kg-A6 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCn-0002Pl-5a for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:60292) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCm-0002OY-Qu for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:45 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MgOVK-1czsaX1sZC-00NkEe; Thu, 16 Feb 2017 15:38:23 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:08 +0100 Message-Id: <20170216143816.2384-7-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:j9z1yr/dkNsEyoeBoP6c+Jfc998INXMgerkssQ2BZzmfrU2g94w dDzZ83czc5NQ070GTrhPrfvCAKwFbF/Pv/5yAWF1239lisLzjrj0Z+YgxCjcezr3vEJqNIP pA9Xai/iH4TSGQBRpPIsKY5aAto74I9QVmeTb2T2QUbaltylJQSGsSRuT+8n94JlkeB7T9m wRDI50Q19SjEMQIiG3/VQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:9a40krdKS10=:49XWz1HusQlR9CBa5DJnE5 S7E+iwPpdqMhcVoIhc7hXkY3mzx9fLvV0/HuAbHHE1LCqFWbxJ3IxoNpaTGfGpB+jz9HHEHmm WPZOPnbJc99Nl7xapUi8JA///ZYAMijN2AECxdx7SxVC8GPL28CCaaumY4+aRKEXS2zC2la94 8yuYB4HQNkk37qfwkM10UjxOasRBXscwgOJHYbUncW72cR6yD00lvaWp3+KZYVYpbPX+6ewAY 6+Bk2EogZNWk9z9MgaC9h2Igpop7L3d8+S7lDvSVrZO2GsXFraRNzP9V3pr80xV7uSo19N+Zy 7f9dNubljUZU5/nLaQEl3NYu2/25ORhDf6OlgLocqzuc6oX30kkYQyq8HJNB1F6IvVIO6JEvi 5altGEOa+i0SkwI7LYXvkk8exjOpvIDOap6T5dZw6/5UKggVuttXfhUKrX7Vdvihp18t1cgZ8 QFffe2SXT7rYbNwaxF+PC2L87TDYxzlvD6OUqTD4SOQGN3/xo/VUO+DxoVX61R7A0yLsaTsCh 2VUHIqzR3GSUYT7ekSyD5AZ9K7NIvuFunr5B8UKI43yYfTLyuxFrexGI2YvCCa76GW0XIARCd N4scFbHutH+UyvnZfTsOnDS9SSmldrX9i7clUh7Qjt+TmGvgLzy1XllcH/zj0/VPY41F67qfr wpTs2ZQp7dYNeFX+isDt/71KELOe4E3LOcRzx9/nTiTPf1TOG7skRxs9ZKtpHWzjB8HQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.75 Subject: [Qemu-devel] [PULL v2 06/14] linux-user: Fix mq_open 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: Lena Djokic , Riku Voipio , Riku Voipio Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Lena Djokic If fourth argument is NULL it should be passed without using lock_user function which would, in that case, return EFAULT, and system call supports passing NULL as fourth argument. Signed-off-by: Lena Djokic Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3e88dd1..c1d6f76 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11583,17 +11583,22 @@ abi_long do_syscall(void *cpu_env, int num, abi_l= ong arg1, case TARGET_NR_mq_open: { struct mq_attr posix_mq_attr; + struct mq_attr *pposix_mq_attr; int host_flags; =20 host_flags =3D target_to_host_bitmask(arg2, fcntl_flags_tbl); - if (copy_from_user_mq_attr(&posix_mq_attr, arg4) !=3D 0) { - goto efault; + pposix_mq_attr =3D NULL; + if (arg4) { + if (copy_from_user_mq_attr(&posix_mq_attr, arg4) !=3D 0) { + goto efault; + } + pposix_mq_attr =3D &posix_mq_attr; } p =3D lock_user_string(arg1 - 1); if (!p) { goto efault; } - ret =3D get_errno(mq_open(p, host_flags, arg3, &posix_mq_attr)= ); + ret =3D get_errno(mq_open(p, host_flags, arg3, pposix_mq_attr)= ); unlock_user (p, arg1, 0); } break; --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487259544663226.19119840180338; Thu, 16 Feb 2017 07:39:04 -0800 (PST) Received: from localhost ([::1]:47382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceO99-0008Lf-24 for importer@patchew.org; Thu, 16 Feb 2017 10:39:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCo-0000kt-Bl for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCl-0002OO-OB for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:54395) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCl-0002NR-Dc for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:43 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0M7Knm-1cQXpx4B3G-00x4zE; Thu, 16 Feb 2017 15:38:24 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:09 +0100 Message-Id: <20170216143816.2384-8-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:FuZ9DSYyucvGMqpCePpYvAGf0CJ2r5StFZKhP/N3ypGC8R4pfeq R+UUW02gdXdYCfls5a5ZQwzJGvb/HDB68TSOPaR9E7fQApIPeX76sW4V8IQb3XIdJ7lzX2Z OqLGkOvMRomAV2H5ARlD5ArqiPCzusdX/4ovhPp1TOK9HnliZ2/aAwyJJlAE/p3lmQ4CPuG ExclbNNRXRWSB11FfSahQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:PvF+EhIaD2Q=:RJhW+ovFUJj3bzPf4SdLkn M3DdnHMgMfBnUFZyxXo0Rc9fEje4b/pLuX6V9wYATLW2tKCuuormcI3qwdQSA8EGvKwWroDtF RszXqCFgMTaqq0ikT4RjZBIvtkB5Qro/hZ6qOSEz2TNks1WueFByyoGTBy74SFzltpUD9adRc i7HlmHl2dN5/UnDiM0XDf19gp19Wd+jsH5rmNdinDSxXPkkZXyPQ7cCVms1YeDo7MInfU9na0 DNTGD2A6xTotOFZtZgq8SQhQltSiu3UjCgKaHV8kAdWXl7HnpUr/kapDvbtd/LsaYjWnVUZzd kfTwwoCron8EnI8i8mfgB6anFH7AZqaOIqnYAyo93EfCIuKm4eItyhqAg1fvX05QTedqah5Fu 3e2yoWESfxwz55blPCHKaDF6lZDFmkGpp/9r89Tysu7oglFEmUnDV6PgeW2gbqSt9QjSqiqec CnMTo8U0ZGGSUGQ9AolpuRz7LVIzyX3HboF8qpazrDNtnJPbz6lLAGqXmtrGXme43kN8J4hy/ dOOCINIcx9dHljWizMQ/26A6mPgwIh2P0cWiKU35YrsmgkEG5KG3ddp1Y+NKFOUBah4oPqxwP 0CRpcFdVcZy18NWRcuUpfyGTk1LZg0xuc8d5wz+sQ4EDzu3g2hvRkvdD2WzIFHQ0LuUXXYAbG 0XbmzKmr4v6zElQMp4hE07YF8iPscPtQ6OcBgrFaLRCpWlOsTQixaZpjwUf2XQy7+JCs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PULL v2 07/14] linux-user: manage two new IFLA host message types 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 , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add QEMU_IFLA_GSO_MAX_SEGS and QEMU_IFLA_GSO_MAX_SIZE in host_to_target_data_link_rtattr(). These two messages are sent by the host kernel when we use "sudo". Found with qemu-m68k and Debian etch-m68k (sudo 1.6.8p12-4) and host kernel 4.7.6-200.fc24.x86_64 Signed-off-by: Laurent Vivier Message-Id: <1477530049-15676-1-git-send-email-laurent@vivier.eu> --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index c1d6f76..d982a27 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2326,6 +2326,8 @@ static abi_long host_to_target_data_link_rtattr(struc= t rtattr *rtattr) case QEMU_IFLA_GROUP: case QEMU_IFLA_MASTER: case QEMU_IFLA_NUM_VF: + case QEMU_IFLA_GSO_MAX_SEGS: + case QEMU_IFLA_GSO_MAX_SIZE: u32 =3D RTA_DATA(rtattr); *u32 =3D tswap32(*u32); break; --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487261454370483.1445030375128; Thu, 16 Feb 2017 08:10:54 -0800 (PST) Received: from localhost ([::1]:47574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOdv-0006qS-Ql for importer@patchew.org; Thu, 16 Feb 2017 11:10:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCh-0000dv-Oq for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCd-0002KJ-NQ for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:39 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:57600) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCd-0002JY-Cd for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:35 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0LZek0-1bxIg02fbY-00lT66; Thu, 16 Feb 2017 15:38:24 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:10 +0100 Message-Id: <20170216143816.2384-9-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:AWdW9ouVh0j3Fajy/xirHcWnaZSXoaVzCR0P2zLD3zTowB4Ewan /q9Xlby5b6aD8F8h4efyq9aKit0E9U4e5Nl+u8MrfNQBGrVaJANCgZn67m9YB3QCst3Utbq tHO4IngU3ZSHXMgq9zukQVqSaHUhIep0WsV3jCW8Pra7JZU9H/YDJySVkF+UH2LTn11VfoX IgRkwHtbS+KrqSHa/WRPA== X-UI-Out-Filterresults: notjunk:1;V01:K0:bAOAUhoYxdo=:3UB9epkg1ZFiRvYPnruo4N XRjaz4DIQCTro3kGWxvuddRWrKw+lpXYyDaGZz1ozBqt3+9Mo50iNtGR+evGWKcJD7r6nb0BE KtXNUzk+/TsXdhHd0WugtWcJ9LP8cB+zhvbf8EbZAioyDetE/DcSD6LDWmJF1dYw+3OW5RoAe 51U4J/neY9/P8LbKwhkflzv/KtMuyNI+MHJdeNPmNJHMI/Rboe+94jBPAdWAIKnHDQ/0REn4m 55pzXHJkdtq4ppwi4DPEmYe50mIUaqMJuGD+7obf/UPixqQy2V86vnBgnr4bMJEP8rFD/V4Vn 3rGqkQxVC8WuKtBFNekx4gK+triZtLv8052QgFXkqxbdFteRlrX4jScTd4b8GTsbIwYqG9PXB oNeC2E43pYKsHiGlq3zk95OPNzp5J8WWBqi5y5H6ZgzpCwU3xm7TgTc/zjKSkPpXRKdr+1FGG +0k43y85Eq8F/3x1l0YVxygcS34XepUCg0I8WOmm3BjMrch2Fmiqx/eLESCvLi27o/FBd/YDw AcieG8AvHMtG/oV2mbcYB481tr7YufsTt9kiawu+wCPbf5PXK/yal1etAOcCpOYonLp8f06G+ 1AhhIxdGBMba7szW/XlJ/1NAYZ6lFA4sg3CXYNBkNL/ijY1puqD4MeJ+euTwvoV31MtINyiFw 6D6rzEkoKL1uCq5Ku1fio4g7L4EpOBB3AdtOc0vnXGIJCr8ZLiNEPfMlsmXrkagi9KR0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PULL v2 08/14] linux-user: Update sh4 syscall definitions to match Linux 4.8 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 , Laurent Vivier , John Paul Adrian Glaubitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz Reviewed-by: Laurent Vivier Message-Id: <20170116223140.18634-2-glaubitz@physik.fu-berlin.de> Signed-off-by: Laurent Vivier --- linux-user/sh4/syscall_nr.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/linux-user/sh4/syscall_nr.h b/linux-user/sh4/syscall_nr.h index e99f735..d6c1e05 100644 --- a/linux-user/sh4/syscall_nr.h +++ b/linux-user/sh4/syscall_nr.h @@ -372,3 +372,17 @@ #define TARGET_NR_process_vm_writev 366 #define TARGET_NR_kcmp 367 #define TARGET_NR_finit_module 368 +#define TARGET_NR_sched_getattr 369 +#define TARGET_NR_sched_setattr 370 +#define TARGET_NR_renameat2 371 +#define TARGET_NR_seccomp 372 +#define TARGET_NR_getrandom 373 +#define TARGET_NR_memfd_create 374 +#define TARGET_NR_bpf 375 +#define TARGET_NR_execveat 376 +#define TARGET_NR_userfaultfd 377 +#define TARGET_NR_membarrier 378 +#define TARGET_NR_mlock2 379 +#define TARGET_NR_copy_file_range 380 +#define TARGET_NR_preadv2 381 +#define TARGET_NR_pwritev2 382 --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487260337516911.8066198233719; Thu, 16 Feb 2017 07:52:17 -0800 (PST) Received: from localhost ([::1]:47467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOLw-0004Bp-A8 for importer@patchew.org; Thu, 16 Feb 2017 10:52:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCf-0000bU-Cf for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCe-0002Kj-Kx for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:37 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:53875) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCe-0002Ji-AI for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:36 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0Lucy0-1cDs7V16v2-00zqgc; Thu, 16 Feb 2017 15:38:25 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:11 +0100 Message-Id: <20170216143816.2384-10-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:foQks0PvLriVGlcMIrtH/3nWTGsHcWbCasRBRutv2G8iDEPh5f9 K1YO5fAkAO1kfC0tt18sDV1R9+nCWeRMwTC3lbtw2Rw6cELp1VCh/fuDQDfmHkWYqR7VSwG JPM+QWbxnzBWkauXL8Mz3l96Ae0XBnYAQ1Wd16Fwn8MB8apLxhGymX0H7gaPeW+OPSbrCLt 2IFgB5Sgq1Abgs9uRivuw== X-UI-Out-Filterresults: notjunk:1;V01:K0:fwlGNMM5eA8=:cCtcIaSeYIsUUJtpkdHLFm SwzvqtInLJLMjWWeXfA8J4l2JZ40Uw2hgw+KkilI6Xu3XmvMnsCtmA7iWK9YFSTO2XTErTdlE OQzNV5MALMOZCRXHGJfd4q4zu1VyWr++CaB1UKOYJ9k2qw17b8BwqFGr4OUKjUzP5l90silIv jGH27/xnGO/0FiYODeYttCG+64vhLTLKRU3xRAPLEcNiOxdfaeP4czhcfUnMrx9QCn/5nGE+N IUiJqoEJDdXm6A926DMSW3zEh6ece5YOIxNvRKj6h86gPgkTXTfQTOGmmwHTRk1NQXcROyb4l V2LNQ3QZQLTdPZoBHYDovmSny+Sok8FoU1wzaNH0rsMIemCGb8RjIbEWuRqT+jM02y4SczBZI TsmsrII5G3Szrhvy11pOsmcBeL0UMQvCVYNao6A2a/EWpMh+wyEyM9JZmB1f98tKAizvQecri n6AYsAMpJgvKPvP2NNdjEJGlPj2a+erjbRGAdpihUQo6+wc9RqLDBHyiSy3vaWFT4ctBwi04M OsplyZPEZh8s/wazaqe2IymXVqsCaiaRuG9RrqeiwwkLpd+wAE0+F8ZKYBQHRT+c3yZKbU9Ud BMoZHPVjYMSnTOmCMi9K4l+qyZ1mswPaBWZeRf7bPtdiTeC8EKxjra5deQMhepq7tZw8ebFuC tN63BbZ8vXUj9ETaLuHnyBhuAnhHsL86ahndpOnVZhv+8JMgGEhvbabHCw8kaqDXe9Eo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PULL v2 09/14] linux-user: Update m68k syscall definitions to match Linux 4.6 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 , Laurent Vivier , John Paul Adrian Glaubitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz Reviewed-by: Laurent Vivier Message-Id: <20170116224915.19430-2-glaubitz@physik.fu-berlin.de> Signed-off-by: Laurent Vivier --- linux-user/m68k/syscall_nr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/m68k/syscall_nr.h b/linux-user/m68k/syscall_nr.h index 4b50fb2..d239551 100644 --- a/linux-user/m68k/syscall_nr.h +++ b/linux-user/m68k/syscall_nr.h @@ -376,3 +376,6 @@ #define TARGET_NR_userfaultfd 373 #define TARGET_NR_membarrier 374 #define TARGET_NR_mlock2 375 +#define TARGET_NR_copy_file_range 376 +#define TARGET_NR_preadv2 377 +#define TARGET_NR_pwritev2 378 --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487261159075925.4163183077522; Thu, 16 Feb 2017 08:05:59 -0800 (PST) Received: from localhost ([::1]:47547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOZ6-0000xh-GX for importer@patchew.org; Thu, 16 Feb 2017 11:05:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCo-0000lB-FT for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCj-0002Mx-NN for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:50888) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCj-0002MS-DD for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:41 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MEmRm-1ccfJA17D0-00G0US; Thu, 16 Feb 2017 15:38:26 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:12 +0100 Message-Id: <20170216143816.2384-11-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:V+rijGOHTx/2oGWQiDPWhAQcGyJIXylKLW3mQ+htSc/NEd9l0pZ LdRq4TwmEKrbmkiz45R5CKzBruXyphXopytkB1+rESDGtOqeYGnYP6vrRYqK2P9kvkS1Nk2 volMxuDHNNfmBB3ADTtbZ1Ek0I7p2umPDhMwSjiqSe0lelfwlilwxop9xe76GaRL7XKKf32 0r7LhcngH+z5TK1Z/6h1A== X-UI-Out-Filterresults: notjunk:1;V01:K0:0VCRPgP4wSk=:MKjfF9C7l5BEnHJv4Ohu/B 44TBq0TrrBYzWIAbRGBCU4T4DnPb4ILTc3IaoFJIpagjyZD3dHKmNds2X2ID4fpyFDq2vSGea kbPeDodk7eTPV9H/2/ApEph9n+7TS2CmY0mlld0Tw1PwAHuVnw5Y0miJsJKFItMM/EhCTT7mZ DjjQZW82RMNs6J13Rw3Br1P4bCnDG5ucEfpPd6LN1OhpiSUDlUeffHKtiW2CK+vmSPSHXcqbI S+vxSdtBwlbhbIfflc522jHzczZEZL59NxWzQv3kc5i4+zIJIkkSaw1ZPue9polMqvHXjvOIf TBGSWC7imU1H2uBNqOn68pTaGAPv3SHl7vxVoE0kYsRD+AyW76RkvB5q8U6KvwJGBKYpr45TP ky1iLcjL6FBN872wYYXI4hFG/kuc2hDeRAvOvVHIGHLqiZh/ni5N3Cpq6+LZ50toYv3ac4MhK xgCcnx6wqpPuXnuw/488yq8uKH2Xur/AMnLeLJhk8Zqk34GPVeyDu8f+hGn5wZ8f08gzPkajf wuj0+iez7Ka+X/1+AN/27FLhQpF1Qq9J14MaXJR8Ca0IFJZ6rlWU1bKsjN3xNPOd4K+0we6lq dRIvC6PdjxU6fVotxpsUmYKmkFmru5fMnsua0dJGUoi8motEyy9StABSoQ+oKo8Q3WHouehsX oQieeIYhj6+h87VlivajKgdsdjHP5Ep0DvA1cbYkyerBO86nLoeSjQ+kunvHbCkpuAeAIG++3 1UprZdq8W4EYxk9F X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PULL v2 10/14] linux-user: fix settime old value location 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?Marc-Andr=C3=A9=20Lureau?= , Pranith Kumar , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: Marc-Andr=C3=A9 Lureau old_value is the 4th argument of timer_settime(), not the 2nd. Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Pranith Kumar Reviewed-by: Laurent Vivier Message-Id: <20170119151533.29328-1-bobby.prani@gmail.com> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d982a27..f569f82 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -12043,10 +12043,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_l= ong arg1, timer_t htimer =3D g_posix_timers[timerid]; struct itimerspec hspec_new =3D {{0},}, hspec_old =3D {{0},}; =20 - target_to_host_itimerspec(&hspec_new, arg3); + if (target_to_host_itimerspec(&hspec_new, arg3)) { + goto efault; + } ret =3D get_errno( timer_settime(htimer, arg2, &hspec_new, &hspec_o= ld)); - host_to_target_itimerspec(arg2, &hspec_old); + if (arg4 && host_to_target_itimerspec(arg4, &hspec_old)) { + goto efault; + } } break; } --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487259190075431.66206836870276; Thu, 16 Feb 2017 07:33:10 -0800 (PST) Received: from localhost ([::1]:47355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceO3O-0002ee-FW for importer@patchew.org; Thu, 16 Feb 2017 10:33:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCo-0000kk-B0 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCj-0002N3-QY for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:55514) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCj-0002MU-Fa for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:41 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MK2AX-1cd09m01Kf-001Ntv; Thu, 16 Feb 2017 15:38:27 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:13 +0100 Message-Id: <20170216143816.2384-12-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:WZOg6fF87hps4ye7wL4orEuVZ+eC9bE+LIKHGBqMGdfoIf0LkdG U/4XGJ6Fcue8SQbB9TwVWE4K7E1b0p/Pw1+E0irzqVLEM6gVDHCOA2EOyLAgeZc7hHg/cjP 25P7lOci3ikdiL9TDKERwa2EflXjAEdMuSHZlCMTPF7s/5V+J2NZZVT2AMVkKy0Li7wNKyE D8mBySTxK1AgCOM5/t+Kg== X-UI-Out-Filterresults: notjunk:1;V01:K0:007AmvymhOk=:3LeeDRWDhbZ/nQ3Yz3M6W7 EbALeYGF3sd8Y3s4+uwY91Lsl51bnuwynvfnCdPh/RJmX/IdXlFf4Q6g1yBgvicJWACO3Sc4R C+mrl8K2m+DRR+BUH3Fm+blqMrHTHlUJBVVWuHX0L4qGoizeVeCiF9n5n9rovmompvsgYjcbQ rnlmQQbx/AHZlGFnW37coyJgRl/ABWQfdQsXdCj6FMoGsDXRMGZGG310WTcxBqUMIfCSNQb7G PyqCWymnURGYgunKZsmWAuy6B5RyN8aenYnsFU8RlRRwXwmLfop/H+qhg7nEeUPFUwZaoaQVE i09VboHBBwsR5DbrzsrslbwyWND/rfDRSAnllloYZlU0SjHP467XcV3nFo7H6eyS3EUXKZtr/ MB0NzvJVjxyektQkfy+/iDaX48IlU1zE9FN0Xj4OWdyJ1lPgti+jBb773WEIvTSkEAspnxzXN +al49qIB9sBLif8x52OHzYDmHw3Y8vL75XKCb4vllPrxdc1cwCt6OGluFzDrqJM5u/jVJpOdb oPq6+lEb3O/wDSSlVcPOh9egpJ8vhZqiELNB/SrmD2X+B+1Busxdvg7kaW2+UhnF9IVpzwsw2 EOcLjTJkF5euvyL4znmy1UvnC68DYqT+WweEU9OtKICtfnxnorUFcctJjMsDq3hdvNRfhT7DN k9Gjiefbq11+msDyv6Lu+ViIcZ0Y4n2CJReS3dNLgDQp4gErsmjL5DBRDtpJpBpIPdahoZJlX XW5oPEXNQBf4zdhv X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PULL v2 11/14] linux-user: fix tcg/mmap test 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?Marc-Andr=C3=A9=20Lureau?= , Pranith Kumar , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: Marc-Andr=C3=A9 Lureau tests/tcg/mmap test fails with values other than default target page size. When creating a map beyond EOF, extra anonymous pages are added up to the target page boundary. Currently, this operation is performed only when qemu_real_host_page_size < TARGET_PAGE_SIZE, but it should be performed if the configured page size (qemu -p) is larger than qemu_real_host_page_size too. Signed-off-by: Marc-Andr=C3=A9 Lureau [pranith: dropped checkpatch changes] Signed-off-by: Pranith Kumar Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Laurent Vivier Message-Id: <20170119151533.29328-2-bobby.prani@gmail.com> Signed-off-by: Laurent Vivier --- linux-user/mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 4ed9cad..4888f53 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -426,9 +426,9 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, in= t prot, may need to truncate file maps at EOF and add extra anonymous pages up to the targets page boundary. */ =20 - if ((qemu_real_host_page_size < TARGET_PAGE_SIZE) - && !(flags & MAP_ANONYMOUS)) { - struct stat sb; + if ((qemu_real_host_page_size < qemu_host_page_size) && + !(flags & MAP_ANONYMOUS)) { + struct stat sb; =20 if (fstat (fd, &sb) =3D=3D -1) goto fail; --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487258925984976.0528629014601; Thu, 16 Feb 2017 07:28:45 -0800 (PST) Received: from localhost ([::1]:47334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNz8-0006Jm-JZ for importer@patchew.org; Thu, 16 Feb 2017 10:28:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCm-0000iw-D4 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCh-0002M7-O9 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:44 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:65068) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCh-0002LZ-D9 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:39 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0M9Gfu-1cXBev2uYY-00CgZo; Thu, 16 Feb 2017 15:38:27 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:14 +0100 Message-Id: <20170216143816.2384-13-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:2pXJsbCPLc9IYuzR+6Aqf8wXoO9GmGwYXUxM4zGthXK8D5Xxu6r xruMfVWUFtUqTFsEAlr7f64nrONilEo8Nc7OTsIjUoyZi3LD6ArfYgFb6NM2R6yVQ3KednE gpzZYnWzEgJXiNqBIDXj9inJkO8Exno/mz6OVB4pmNy86qYPfc/sLlbCvZmXQabEdHa5FH4 JJvSRCdiNR8UdZiA3/Lnw== X-UI-Out-Filterresults: notjunk:1;V01:K0:S5qlGvYOk4s=:0yRBNUEea7KU52mNSOGWQ5 tFqYXz+eTzBuhtffw1wigkrqnRuK2/7YF5j0GxP/WPgHU0fiFan47xpb7bGQfkheE44kEOstd RNNzS3ZOTYc52yjzKN4+YRxPMOuieLJfGjaNM8nSqunTzlW/cSOPA/8/B2V6sEtFk+dRsmaaG EkAL++VdqeVkxy52TcyRrBvnPw2DOMQAiqXl9bpO685oLUfO/iaQk9JTPLsOTNGdk4N8P3r6S 7gENAFdQQ85PMY0sDDYpMyBCTQEikApD/kJML9jip6gfrn+Y99iESA+5jdQ2N3PboQkiCXoXY PZy0d43tX2/K3uxhYTILlidkF/lK3vW2LVnBK55SQdi2i93uq3GgdLpvllauO7/4gOuf/Imie P1m2lsXLg+wzLFMfXEDjMmkEEtL4BI7R5O+zqMwWB71bKWhVEPXP/Hn82s9X2PcaIsueMsYV2 hlCLivFOn18XAUvsplwwHYnzQggDV7Gnb2GJff7lCM3QCxPY1COcMzAGE71C2xoKHeLEmXr4o JceSe+BfPTlHlYxINIhTFxBktKPBPSMKA+5jEysF/WP1D2GunpUNHEAJYconpyjjuwjokAw1x bMWEfbhwOwqGZwj/itR3fAUzGaivEDxVJRURpBUSmw0rnn0tR99NeZfv3dUUN/o15Iu5obEwb YqyHBCG6mMYPKBbuHwovMYUSNomORBj4P3uEsGDwdWW70cD66Uo4XGCdgawS/CgfS2Wg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PULL v2 12/14] linux-user: fill target sigcontext struct accordingly 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 , Jose Ricardo Ziviani , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Jose Ricardo Ziviani A segfault is noticed when an emulated program uses any of ucontext regs fields. Risu detected this issue in the following operation when handling a signal: ucontext_t *uc =3D (ucontext_t*)uc; uc->uc_mcontext.regs->nip +=3D 4; but this works fine: uc->uc_mcontext.gp_regs[PT_NIP] +=3D 4; This patch set regs to a valid location as well as other sigcontext fields. Signed-off-by: Jose Ricardo Ziviani Reviewed-by: Laurent Vivier Message-Id: <1485900317-3256-1-git-send-email-joserz@linux.vnet.ibm.com> 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 5064de0..8209539 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -5155,6 +5155,7 @@ static void setup_rt_frame(int sig, struct target_sig= action *ka, target_ulong rt_sf_addr, newsp =3D 0; int i, err =3D 0; #if defined(TARGET_PPC64) + struct target_sigcontext *sc =3D 0; struct image_info *image =3D ((TaskState *)thread_cpu->opaque)->info; #endif =20 @@ -5183,6 +5184,10 @@ static void setup_rt_frame(int sig, struct target_si= gaction *ka, #if defined(TARGET_PPC64) mctx =3D &rt_sf->uc.tuc_sigcontext.mcontext; trampptr =3D &rt_sf->trampoline[0]; + + sc =3D &rt_sf->uc.tuc_sigcontext; + __put_user(h2g(mctx), &sc->regs); + __put_user(sig, &sc->signal); #else mctx =3D &rt_sf->uc.tuc_mcontext; trampptr =3D (uint32_t *)&rt_sf->uc.tuc_mcontext.tramp; --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487258987050870.0591262726279; Thu, 16 Feb 2017 07:29:47 -0800 (PST) Received: from localhost ([::1]:47337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceO08-0007CF-IZ for importer@patchew.org; Thu, 16 Feb 2017 10:29:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCk-0000gn-Cn for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCg-0002LP-B7 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:42 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:52445) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCg-0002Kr-0O for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:38 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0M2uxS-1cMA7u1P9y-00sf8u; Thu, 16 Feb 2017 15:38:28 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:15 +0100 Message-Id: <20170216143816.2384-14-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:zFhnxao5bq+YIvzETA9BDxT2vca4sEA5PC7p7rEobu662fNO3gD uaIs+HYs33HHJRwlm4TmxtQugZOh6kUBZg6gUcHd4Ygk2ZZuf+uiRIjG/KLW7V7kYcJ3q+d pSoq0p/gvC8mlozpu65+h+nPDgn0Ev3mabah7Yj88K5jf4QuugACphWhCLwhvGqN0h4bNNg SUNNCvrr22q5CP+Yl/nHg== X-UI-Out-Filterresults: notjunk:1;V01:K0:xCz3WQAaXMU=:2+6uEhfeptmCrCBz3rgAMM TErSWtdM+6ZEjSw6xjksmhbouLvaz7x72rnCqDCGcO3700lsIFD/yBH5U+7qevTgx0mVyHijE oPWrP4kMvMyknfr9uvmAG6SXZGhi6GuyHUIOsGE54n0lFld+XCkhoO+2UXItwgFpXaE2vnM7t MmMcq8LdBhymAPPcCIgqvY7uSltYTWYA5z/0gQDdv0vcrZIydE4krhc4HPqJZDsyRgaZiAkoL BjWGZ87IPZCtdFKH1B9jgSde1nnhj3n3VnQBCXDjr92nzxz04vt8BC6p3dYRyX4KWf/QdvinY FjUrLPn1dt8KogKvswtOoqD4OQ9KcEb2h9WC9PZzL1FL9AttUd1GQ3TIUsQureJz7CUPqDQ5f kLaW8N8HPE4TXFnztRMTD7tnt9N6RjUls8LzKt6jlEGxyGhy6RTeHnT+1a6QkX+Ei6Fd8a0g3 JmRb0RatwKGD/klCOah5LgB2iFtMZTUJVrovpRO9P66w2RvpNd/OlFOfzN318r4cudroZDFhD w5bPWB8k9jQ4pMPHqMEJU4JUMDNYHNYj3jnuxinNPtTVA9/vqD/b4VLArtQP3E4vFfa7+9qd6 HC5DysRVR1qaIx7k4PGeIkTYbknpbFhblQ+ekAVXTp5730/Fa1oRoBIrrpqw37cIF5DTvIx80 I4sy92J/yhxRj8GLJyWdxhORq/3ZB/1wvBcIEXTWLMrrDWxOxakHwCLokLozzdgSYIgb52d/i hc9ND04yzrEGv2MI X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.13 Subject: [Qemu-devel] [PULL v2 13/14] linux-user: Use correct types in load_symbols() 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: Peter Maydell , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: Peter Maydell Coverity doesn't like the code in load_symbols() which assumes it can use 'int' for a variable that might hold an offset into the guest ELF file, because in a 64-bit guest that could overflow. Guest binaries with 2GB sections aren't very likely and this isn't a security issue because we fully trust the guest linux-user binary anyway, but we might as well use the right types, which will placate Coverity. Use uint64_t to hold section sizes, and bail out if the symbol table is too large rather than just overflowing an int. (Coverity issue CID1005776) Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <1486249533-5260-1-git-send-email-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 8271227..f520d77 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2262,6 +2262,7 @@ static int symcmp(const void *s0, const void *s1) static void load_symbols(struct elfhdr *hdr, int fd, abi_ulong load_bias) { int i, shnum, nsyms, sym_idx =3D 0, str_idx =3D 0; + uint64_t segsz; struct elf_shdr *shdr; char *strings =3D NULL; struct syminfo *s =3D NULL; @@ -2293,19 +2294,26 @@ static void load_symbols(struct elfhdr *hdr, int fd= , abi_ulong load_bias) goto give_up; } =20 - i =3D shdr[str_idx].sh_size; - s->disas_strtab =3D strings =3D g_try_malloc(i); - if (!strings || pread(fd, strings, i, shdr[str_idx].sh_offset) !=3D i)= { + segsz =3D shdr[str_idx].sh_size; + s->disas_strtab =3D strings =3D g_try_malloc(segsz); + if (!strings || + pread(fd, strings, segsz, shdr[str_idx].sh_offset) !=3D segsz) { goto give_up; } =20 - i =3D shdr[sym_idx].sh_size; - syms =3D g_try_malloc(i); - if (!syms || pread(fd, syms, i, shdr[sym_idx].sh_offset) !=3D i) { + segsz =3D shdr[sym_idx].sh_size; + syms =3D g_try_malloc(segsz); + if (!syms || pread(fd, syms, segsz, shdr[sym_idx].sh_offset) !=3D segs= z) { goto give_up; } =20 - nsyms =3D i / sizeof(struct elf_sym); + if (segsz / sizeof(struct elf_sym) > INT_MAX) { + /* Implausibly large symbol table: give up rather than ploughing + * on with the number of symbols calculation overflowing + */ + goto give_up; + } + nsyms =3D segsz / sizeof(struct elf_sym); for (i =3D 0; i < nsyms; ) { bswap_sym(syms + i); /* Throw away entries which we do not need. */ --=20 2.9.3 From nobody Fri May 3 14:34:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487261702198558.9953605268772; Thu, 16 Feb 2017 08:15:02 -0800 (PST) Received: from localhost ([::1]:47593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOhw-00031T-RS for importer@patchew.org; Thu, 16 Feb 2017 11:15:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCo-0000kf-A8 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCj-0002Mg-97 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:46 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:57207) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCi-0002ML-Ui for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:41 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MXYog-1cr2tW43hW-00WZwK; Thu, 16 Feb 2017 15:38:29 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:38:16 +0100 Message-Id: <20170216143816.2384-15-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> X-Provags-ID: V03:K0:QXNlestyIiqTWUP8JYcLf/QFd5Lm3XZasFKdFNEQyO/BsDEoD9z 9mboEtAyG0YvRvwiByPyhoy75CdjG8d/0RbJIR5Vbl89eFjs6VJblC0ZVSI1VWZRsCRhE7J B17muUb5riHUjhgl+BYV8x7w4YgoO+0UoYUL1Q+TOCHbRuipI/NQn8XFsQrQOCS+/LXqrJD Nti46j4zkDmMgDYH/FztA== X-UI-Out-Filterresults: notjunk:1;V01:K0:sN94X4mRv4E=:4488bvYoiYjeMN54EBfxhf gbMAnGYLbO2yfDVY6zyQXIg5S/l6qf4rWAq4iiUaY3COdwfBy9OfdPFpqb5ExBXJijebX/iuT R3j5NDdWl87yfxmmfawlxfy1l0pvUaTLGwLWQ4QMhlHyYt6ZsjmA6sfAFoIe9oL1PCh9uW+mj 8Gm0GLIfVGaZ3it7tXbvsqdLUtI3Oq6JUKltVsKK2vB4kyOyaONOLCI15DaoZqKJ6b/vLdKB1 a0O5k8mqrOM5zyIY/jqGB98sckx2aghaXHxOCqgazPY98uU2wS9zIjwZ1539Te+p9sKIkjvFC UnMAg4RwJpw9WW9hFjn4HdhaDFMw5u6tGVNM7jatUoRIaLahZ8+Db7V1C7U9k0byUMmB+2Dc2 wl4b4We2AH/zZmJLMh6s39ekOeOufrU4rtqbB/xz5DIYmEK2H1U4hpTS68s0tqrCK13jNuXBW ZzYN4fNo45uBKMwEibziOfJaQNDRSlUbClewH4cLYbDpg6NqkrBDAaT0dYktDBi+6BSvLqhp3 xYP6dEuEIj2D8Gml3HYeub/gp3edqK+SKExuidTBsmgeRbtE6ap/xd6k72qY62WZMpPCQL8s/ lwyy5WL1cQuQEmd7arX2lw3fF1bf8UmUXa1sqVOQ8JuNgUXGfBO/yvNeYdAEZGjIGcVARAcb8 ZElNYGRdEBhvBoCm7+QAiwG3nnufsSx8CX1KrOxM4uGbk9DgBlc9U7zmOtFHbY6Aw+lw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.75 Subject: [Qemu-devel] [PULL v2 14/14] linux-user: Add FICLONE and FICLONERANGE ioctls 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Helge Deller Add missing FICLONE and FICLONERANGE ioctls. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20170211222602.GA6399@ls3530.fritz.box> Signed-off-by: Laurent Vivier --- linux-user/ioctls.h | 5 +++++ linux-user/syscall_defs.h | 4 ++++ linux-user/syscall_types.h | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 2f6e85b..e6997ff 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -112,6 +112,11 @@ #ifdef FIBMAP IOCTL(FIBMAP, IOC_W | IOC_R, MK_PTR(TYPE_LONG)) #endif +#ifdef FICLONE + IOCTL(FICLONE, IOC_W, TYPE_INT) + IOCTL(FICLONERANGE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_file_clone_range))) +#endif + #ifdef FIGETBSZ IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG)) #endif diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 4442c22..72ca5b1 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1086,6 +1086,10 @@ struct target_pollfd { =20 #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ #define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used fo= r bmap */ + +#define TARGET_FICLONE TARGET_IOW(0x94, 9, int) +#define TARGET_FICLONERANGE TARGET_IOW(0x94, 13, struct file_clone_range) + /* Note that the ioctl numbers claim type "long" but the actual type * used by the kernel is "int". */ diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index 2b8c0c6..24631b0 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -232,6 +232,12 @@ STRUCT(dm_target_versions, STRUCT(dm_target_msg, TYPE_ULONGLONG) /* sector */ =20 +STRUCT(file_clone_range, + TYPE_LONGLONG, /* src_fd */ + TYPE_ULONGLONG, /* src_offset */ + TYPE_ULONGLONG, /* src_length */ + TYPE_ULONGLONG) /* dest_offset */ + STRUCT(fiemap_extent, TYPE_ULONGLONG, /* fe_logical */ TYPE_ULONGLONG, /* fe_physical */ --=20 2.9.3