diff options
Diffstat (limited to 'arch/alpha/kernel/ptrace.c')
| -rw-r--r-- | arch/alpha/kernel/ptrace.c | 37 | 
1 files changed, 17 insertions, 20 deletions
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index e2af5eb59bb..86d835157b5 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c @@ -13,10 +13,11 @@  #include <linux/user.h>  #include <linux/security.h>  #include <linux/signal.h> +#include <linux/tracehook.h> +#include <linux/audit.h>  #include <asm/uaccess.h>  #include <asm/pgtable.h> -#include <asm/system.h>  #include <asm/fpu.h>  #include "proto.h" @@ -313,25 +314,21 @@ long arch_ptrace(struct task_struct *child, long request,  	return ret;  } +asmlinkage unsigned long syscall_trace_enter(void) +{ +	unsigned long ret = 0; +	struct pt_regs *regs = current_pt_regs(); +	if (test_thread_flag(TIF_SYSCALL_TRACE) && +	    tracehook_report_syscall_entry(current_pt_regs())) +		ret = -1UL; +	audit_syscall_entry(AUDIT_ARCH_ALPHA, regs->r0, regs->r16, regs->r17, regs->r18, regs->r19); +	return ret ?: current_pt_regs()->r0; +} +  asmlinkage void -syscall_trace(void) +syscall_trace_leave(void)  { -	if (!test_thread_flag(TIF_SYSCALL_TRACE)) -		return; -	if (!(current->ptrace & PT_PTRACED)) -		return; -	/* The 0x80 provides a way for the tracing parent to distinguish -	   between a syscall stop and SIGTRAP delivery */ -	ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) -				 ? 0x80 : 0)); - -	/* -	 * This isn't the same as continuing with a signal, but it will do -	 * for normal use.  strace only continues with a signal if the -	 * stopping signal is not SIGTRAP.  -brl -	 */ -	if (current->exit_code) { -		send_sig(current->exit_code, current, 1); -		current->exit_code = 0; -	} +	audit_syscall_exit(current_pt_regs()); +	if (test_thread_flag(TIF_SYSCALL_TRACE)) +		tracehook_report_syscall_exit(current_pt_regs(), 0);  }  | 
