提交 86ca57b5 编写于 作者: L Lars Persson 提交者: Ralf Baechle

MIPS: Fix syscall tracing interface

Fix pointer computation for stack-based arguments.
Signed-off-by: NLars Persson <larper@axis.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6620/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 a8031d2c
...@@ -40,14 +40,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg, ...@@ -40,14 +40,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
#ifdef CONFIG_32BIT #ifdef CONFIG_32BIT
case 4: case 5: case 6: case 7: case 4: case 5: case 6: case 7:
return get_user(*arg, (int *)usp + 4 * n); return get_user(*arg, (int *)usp + n);
#endif #endif
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
case 4: case 5: case 6: case 7: case 4: case 5: case 6: case 7:
#ifdef CONFIG_MIPS32_O32 #ifdef CONFIG_MIPS32_O32
if (test_thread_flag(TIF_32BIT_REGS)) if (test_thread_flag(TIF_32BIT_REGS))
return get_user(*arg, (int *)usp + 4 * n); return get_user(*arg, (int *)usp + n);
else else
#endif #endif
*arg = regs->regs[4 + n]; *arg = regs->regs[4 + n];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部