aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2010-09-28 13:50:27 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-10-18 11:59:02 -0400
commite5b377a8fb7b05f27647698ac739a0504cb2bf80 (patch)
tree709838474a29aa0b7e763fda587a875c4e98a824 /arch/mips
parent062ab57b2f8439ab506645cf6f29432e7c61497c (diff)
MIPS: secure_computing, syscall audit: syscall number should in r2, not r0.
As it is, audit_syscall_entry() and secure_computing() get the bogus value (0, in fact) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1697/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index c51b95ff8644..c8777333e198 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -536,7 +536,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
536{ 536{
537 /* do the secure computing check first */ 537 /* do the secure computing check first */
538 if (!entryexit) 538 if (!entryexit)
539 secure_computing(regs->regs[0]); 539 secure_computing(regs->regs[2]);
540 540
541 if (unlikely(current->audit_context) && entryexit) 541 if (unlikely(current->audit_context) && entryexit)
542 audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]), 542 audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]),
@@ -565,7 +565,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
565 565
566out: 566out:
567 if (unlikely(current->audit_context) && !entryexit) 567 if (unlikely(current->audit_context) && !entryexit)
568 audit_syscall_entry(audit_arch(), regs->regs[0], 568 audit_syscall_entry(audit_arch(), regs->regs[2],
569 regs->regs[4], regs->regs[5], 569 regs->regs[4], regs->regs[5],
570 regs->regs[6], regs->regs[7]); 570 regs->regs[6], regs->regs[7]);
571} 571}