Skip to contentSkip to conversation

mips: syscall number in in R2, not R0...

PATCH Applied Al Viro 2 participants 2 messages Sep 28, 2010 – Oct 14, 2010

Subsystems (3)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 2/5 mips: syscall number in in R2, not R0...

as it is, audit_syscall_entry() and secure_computing() get the bogus value (0, in fact)

---
 arch/mips/kernel/ptrace.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/ptrace.c +2 -2
index c51b95f..c877733 100644
@@ -536,7 +536,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
 {
 	/* do the secure computing check first */
 	if (!entryexit)
-		secure_computing(regs->regs[0]);
+		secure_computing(regs->regs[2]);
 
 	if (unlikely(current->audit_context) && entryexit)
 		audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]),
@@ -565,7 +565,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
 
 out:
 	if (unlikely(current->audit_context) && !entryexit)
-		audit_syscall_entry(audit_arch(), regs->regs[0],
+		audit_syscall_entry(audit_arch(), regs->regs[2],
 				    regs->regs[4], regs->regs[5],
 				    regs->regs[6], regs->regs[7]);
 }
Signature · 1 line
1.5.6.5