From patchwork Thu Feb 16 14:38:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 728807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vPLvK2dMxz9s8X for ; Fri, 17 Feb 2017 03:19:09 +1100 (AEDT) Received: from localhost ([::1]:47617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceOlu-0007oq-5e for incoming@patchwork.ozlabs.org; Thu, 16 Feb 2017 11:19:06 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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_long arg1, arg3 = arg4; arg4 = arg5; } - ret = get_errno(readahead(arg1, ((off64_t)arg3 << 32) | arg2, arg4)); + ret = get_errno(readahead(arg1, target_offset64(arg2, arg3) , arg4)); #else ret = get_errno(readahead(arg1, arg2, arg3)); #endif