MIPS: Fix syscall tracing interface
PATCH v2 1/1 MIPS: Fix syscall tracing interface
Fix pointer computation for stack-based arguments.
Signed-off-by Lars Persson <[email protected]>
--- arch/mips/include/asm/syscall.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/syscall.h +2 -2
@@ -51,14 +51,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];
Signature · 1 line
1.7.2.5
Hi Lars,
Quoted 19 lines · Lars Persson
Fix pointer computation for stack-based arguments.
Signed-off-by Lars Persson <[email protected]>--- arch/mips/include/asm/syscall.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)arch/mips/include/asm/syscall.h +1
-1@@ -51,14 +51,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
arch/mips/include/asm/syscall.h static inline unsigned long mips_get_syscall_arg(unsigned long *arg, · line 64
Quoted 10 lines
arch/mips/include/asm/syscall.h +1
-1#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];
Thanks for the v2.
It looks good to me but I haven't tested it.
Reviewed-by Markos Chandras <[email protected]>
Signature · 1 line
markos