qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: An-Cheng Huang <ancheng@ubnt.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: riku.voipio@iki.fi, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] linux-user: Fix indirect syscall handling for MIPS
Date: Fri, 5 Aug 2011 10:54:23 -0700	[thread overview]
Message-ID: <20110805175423.GC5323@debian.localdomain> (raw)
In-Reply-To: <CAFEAcA8+LFtt=0QHB4iGXRA-Pi2N-9quGn+aciHoRVHxEYPwRA@mail.gmail.com>

On Fri, Aug 05, 2011 at 10:27:21AM +0100, Peter Maydell wrote:
> On 5 August 2011 01:05, An-Cheng Huang <ancheng@ubnt.com> wrote:
> > Ok the following patch changes the number of arguments for sys_syscall
> > to 8 in mips_syscall_args and also skips the do_syscall() call if any
> > of the get_user() calls fails. Do you think combining these makes sense
> > or should they be two separate patches? Thanks.
> 
> The code in this patch looks good, but yes, I think they should
> be two separate patches.

Here's the first patch for the indirect syscall:

This patch changes the number of arguments for sys_syscall on MIPS to 8, which allows the arguments for the actual syscall to be handled correctly.

Signed-off-by: An-Cheng Huang <ancheng@ubnt.com>
---
 linux-user/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index 6a8f4bd..9e67b24 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1669,7 +1669,7 @@ void cpu_loop(CPUPPCState *env)
 #define MIPS_SYS(name, args) args,
 
 static const uint8_t mips_syscall_args[] = {
-	MIPS_SYS(sys_syscall	, 0)	/* 4000 */
+	MIPS_SYS(sys_syscall	, 8)	/* 4000 */
 	MIPS_SYS(sys_exit	, 1)
 	MIPS_SYS(sys_fork	, 0)
 	MIPS_SYS(sys_read	, 3)

  reply	other threads:[~2011-08-05 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 22:16 [Qemu-devel] [PATCH] linux-user: Fix indirect syscall handling for MIPS An-Cheng Huang
2011-08-04 22:43 ` Peter Maydell
2011-08-05  0:05   ` An-Cheng Huang
2011-08-05  9:27     ` Peter Maydell
2011-08-05 17:54       ` An-Cheng Huang [this message]
2011-08-05 17:57       ` [Qemu-devel] [PATCH 2/2] " An-Cheng Huang

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=20110805175423.GC5323@debian.localdomain \
    --to=ancheng@ubnt.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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).