Skip to content

Commit

Permalink
m68k: use tracehook_report_syscall_entry/exit for ColdFire MMU ptrace…
Browse files Browse the repository at this point in the history
… path

The existing ColdFire code (which is all non-mmu) for system call entry
and exit uses the more modern tracehook_report_syscall_entry()/exit()
into the ptrace code. Now that we are supporting ColdFire with MMU we
need the same hooks for these.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Matt Waddel <mwaddel@yahoo.com>
Acked-by: Kurt Mahan <kmahan@xmission.com>
  • Loading branch information
Greg Ungerer committed Dec 30, 2011
1 parent 83b73d6 commit 8b38f3c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions arch/m68k/kernel/ptrace_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/signal.h>
#include <linux/tracehook.h>

#include <asm/uaccess.h>
#include <asm/page.h>
Expand Down Expand Up @@ -275,3 +276,20 @@ asmlinkage void syscall_trace(void)
current->exit_code = 0;
}
}

#ifdef CONFIG_COLDFIRE
asmlinkage int syscall_trace_enter(void)
{
int ret = 0;

if (test_thread_flag(TIF_SYSCALL_TRACE))
ret = tracehook_report_syscall_entry(task_pt_regs(current));
return ret;
}

asmlinkage void syscall_trace_leave(void)
{
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(task_pt_regs(current), 0);
}
#endif /* CONFIG_COLDFIRE */

0 comments on commit 8b38f3c

Please sign in to comment.