aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/ptrace_64.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-02-15 00:49:37 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-02-15 00:49:37 -0500
commit028c5d5d596651bce13d06737eb3707a7e99a30c (patch)
treee4e429858a19635ad2b5aa563bf1b4e39396d4e2 /arch/sh/kernel/ptrace_64.c
parent19f6b8b44e3f633d5d7d1ed68848b1eb89a1e800 (diff)
parent4b505db9c4c72dbd2a8e66b8d681640101325af6 (diff)
Merge branch 'sh/stable-updates'
Diffstat (limited to 'arch/sh/kernel/ptrace_64.c')
-rw-r--r--arch/sh/kernel/ptrace_64.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index 2f6140e95ec5..5fd644da7f02 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -132,6 +132,8 @@ void user_enable_single_step(struct task_struct *child)
132 struct pt_regs *regs = child->thread.uregs; 132 struct pt_regs *regs = child->thread.uregs;
133 133
134 regs->sr |= SR_SSTEP; /* auto-resetting upon exception */ 134 regs->sr |= SR_SSTEP; /* auto-resetting upon exception */
135
136 set_tsk_thread_flag(child, TIF_SINGLESTEP);
135} 137}
136 138
137void user_disable_single_step(struct task_struct *child) 139void user_disable_single_step(struct task_struct *child)
@@ -139,6 +141,8 @@ void user_disable_single_step(struct task_struct *child)
139 struct pt_regs *regs = child->thread.uregs; 141 struct pt_regs *regs = child->thread.uregs;
140 142
141 regs->sr &= ~SR_SSTEP; 143 regs->sr &= ~SR_SSTEP;
144
145 clear_tsk_thread_flag(child, TIF_SINGLESTEP);
142} 146}
143 147
144static int genregs_get(struct task_struct *target, 148static int genregs_get(struct task_struct *target,
@@ -453,6 +457,8 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)
453 457
454asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) 458asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
455{ 459{
460 int step;
461
456 if (unlikely(current->audit_context)) 462 if (unlikely(current->audit_context))
457 audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]), 463 audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]),
458 regs->regs[9]); 464 regs->regs[9]);
@@ -460,8 +466,9 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
460 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) 466 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
461 trace_sys_exit(regs, regs->regs[9]); 467 trace_sys_exit(regs, regs->regs[9]);
462 468
463 if (test_thread_flag(TIF_SYSCALL_TRACE)) 469 step = test_thread_flag(TIF_SINGLESTEP);
464 tracehook_report_syscall_exit(regs, 0); 470 if (step || test_thread_flag(TIF_SYSCALL_TRACE))
471 tracehook_report_syscall_exit(regs, step);
465} 472}
466 473
467/* Called with interrupts disabled */ 474/* Called with interrupts disabled */