Skip to contentSkip to conversation

MIPS: Fix syscall tracing interface

PATCH Superseded Lars Persson 2 participants 3 messages Mar 17, 2014 MIPS

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Fix syscall tracing interface

The MIPS syscall tracing interface had multiple bugs that made it completely unusable.

---
 arch/mips/include/asm/syscall.h |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)
arch/mips/include/asm/syscall.h +3 -13
index 81c8913..8d08b6f 100644
@@ -39,14 +39,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
 
 #ifdef CONFIG_32BIT
 	case 4: case 5: case 6: case 7:
-		return get_user(*arg, (int *)usp + 4 * n);
+		return get_user(*arg, (int *)usp + n);
 #endif
 
 #ifdef CONFIG_64BIT
 	case 4: case 5: case 6: case 7:
 #ifdef CONFIG_MIPS32_O32
 		if (test_thread_flag(TIF_32BIT_REGS))
-			return get_user(*arg, (int *)usp + 4 * n);
+			return get_user(*arg, (int *)usp + n);
 		else
 #endif
 			*arg = regs->regs[4 + n];
@@ -83,18 +83,8 @@ static inline void syscall_get_arguments(struct task_struct *task,
 					 unsigned int i, unsigned int n,
 					 unsigned long *args)
 {
-	unsigned long arg;
-	int ret;
-
 	while (n--)
-		ret |= mips_get_syscall_arg(&arg, task, regs, i++);
-
-	/*
-	 * No way to communicate an error because this is a void function.
-	 */
-#if 0
-	return ret;
-#endif
+		mips_get_syscall_arg(args++, task, regs, i++);
 }
 
 extern const unsigned long sys_call_table[];
Signature · 1 line
1.7.2.5
#1 lore raw

Hi Lars,

Quoted 4 lines · Lars Persson

The MIPS syscall tracing interface had multiple bugs that made it completely unusable.

The last part of your patch will conflict with

http://patchwork.linux-mips.org/patch/6402/

which is already in the linux-next tree.

The rest of the changes look reasonable to me.

I believe it is best if you base your patches on upstream-sfr/mips-for-linux-next[1] branch.

[1] http://git.linux-mips.org/?p=ralf/upstream-sfr.git;a=shortlog;h=refs/heads/mips-for-linux-next

Signature · 1 line
markos
#2 lore raw

Thanks, I will resubmit a patch based on the mips-for-linux-next branch.

- Las

Quoted 32 lines

-----Original Message-----
From: Markos Chandras [mailto:[email protected]]
Sent: den 17 mars 2014 10:27
To: Lars Persson; [email protected]
Cc: Lars Persson
Subject: Re: [PATCH] MIPS: Fix syscall tracing interface

Hi Lars,

Quoted 4 lines · Lars Persson

The MIPS syscall tracing interface had multiple bugs that made it completely unusable.

The last part of your patch will conflict with

http://patchwork.linux-mips.org/patch/6402/

which is already in the linux-next tree.

The rest of the changes look reasonable to me.

I believe it is best if you base your patches on upstream-sfr/mips-for- linux-next[1] branch.

[1]
http://git.linux-mips.org/?p=ralf/upstream-
sfr.git;a=shortlog;h=refs/heads/mips-for-linux-next

--
markos