From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ6R5-0005oY-W4 for qemu-devel@nongnu.org; Wed, 04 Feb 2015 15:20:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ6R1-0005Ky-Th for qemu-devel@nongnu.org; Wed, 04 Feb 2015 15:20:31 -0500 Received: from mail-lb0-f179.google.com ([209.85.217.179]:47813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ6R1-0005K3-GS for qemu-devel@nongnu.org; Wed, 04 Feb 2015 15:20:27 -0500 Received: by mail-lb0-f179.google.com with SMTP id z11so2637942lbi.10 for ; Wed, 04 Feb 2015 12:20:26 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Peter Maydell Date: Wed, 4 Feb 2015 20:20:06 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] Fix emulation of splice syscall List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas Schwab Cc: QEMU Developers On 4 February 2015 at 16:37, Andreas Schwab wrote: > The second and fourth argument are in/out parameters, store them back > after the syscall. Also, the fourth argument was mishandled, and EFAULT > handling was missing. > > Signed-off-by: Andreas Schwab > --- > linux-user/syscall.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index d4398b9..db2f5c7 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -9345,14 +9345,24 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, > loff_t loff_in, loff_out; > loff_t *ploff_in = NULL, *ploff_out = NULL; > if(arg2) { > - get_user_u64(loff_in, arg2); > + if (get_user_u64(loff_in, arg2)) > + goto efault; Coding style demands braces for all these if statements. Otherwise Reviewed-by: Peter Maydell -- PMM