Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339522
b: refs/heads/master
c: b10bca0
h: refs/heads/master
v: v3
  • Loading branch information
Will Deacon authored and Russell King committed Dec 11, 2012
1 parent c888cd8 commit 9b1875a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39b175a0092d4a8e0875c67df82285475b1da591
refs/heads/master: b10bca0bc699af201770989a88fa293155e9d8de
1 change: 0 additions & 1 deletion trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ __sys_trace:

__sys_trace_return:
str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
mov r1, scno
mov r0, sp
bl syscall_trace_exit
b ret_slow_syscall
Expand Down
24 changes: 15 additions & 9 deletions trunk/arch/arm/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,17 +957,23 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
return scno;
}

asmlinkage int syscall_trace_exit(struct pt_regs *regs, int scno)
asmlinkage void syscall_trace_exit(struct pt_regs *regs)
{
current_thread_info()->syscall = scno;

if (test_thread_flag(TIF_SYSCALL_TRACE))
scno = tracehook_report_syscall(regs, PTRACE_SYSCALL_EXIT);
/*
* Audit the syscall before anything else, as a debugger may
* come in and change the current registers.
*/
audit_syscall_exit(regs);

/*
* Note that we haven't updated the ->syscall field for the
* current thread. This isn't a problem because it will have
* been set on syscall entry and there hasn't been an opportunity
* for a PTRACE_SET_SYSCALL since then.
*/
if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
trace_sys_exit(regs, scno);

audit_syscall_exit(regs);
trace_sys_exit(regs, regs_return_value(regs));

return scno;
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall(regs, PTRACE_SYSCALL_EXIT);
}

0 comments on commit 9b1875a

Please sign in to comment.