From: Peter Maydell <peter.maydell@linaro.org>
To: Andreas Schwab <schwab@suse.de>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Fix emulation of splice syscall
Date: Wed, 4 Feb 2015 20:20:06 +0000 [thread overview]
Message-ID: <CAFEAcA_YzE_ALiyEEiM-s6VthN=z_fa-6SzWN+uxHXKj2Dd-+g@mail.gmail.com> (raw)
In-Reply-To: <mvmsieliqel.fsf@hawking.suse.de>
On 4 February 2015 at 16:37, Andreas Schwab <schwab@suse.de> 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 <schwab@suse.de>
> ---
> 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 <peter.maydell@linaro.org>
-- PMM
next prev parent reply other threads:[~2015-02-04 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 16:37 [Qemu-devel] [PATCH] Fix emulation of splice syscall Andreas Schwab
2015-02-04 20:20 ` Peter Maydell [this message]
2015-02-05 8:20 ` Andreas Schwab
2015-02-05 8:31 ` Peter Maydell
2015-02-05 11:31 ` Andreas Schwab
2015-02-05 11:33 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFEAcA_YzE_ALiyEEiM-s6VthN=z_fa-6SzWN+uxHXKj2Dd-+g@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).