[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] linux-user: Fix indirect syscall handling f
From: |
An-Cheng Huang |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] linux-user: Fix indirect syscall handling for MIPS |
Date: |
Fri, 5 Aug 2011 10:54:23 -0700 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Fri, Aug 05, 2011 at 10:27:21AM +0100, Peter Maydell wrote:
> On 5 August 2011 01:05, An-Cheng Huang <address@hidden> 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 <address@hidden>
---
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)