ptrace: x86: change syscall_trace_leave() to rely on tracehook when stepping
authorOleg Nesterov <oleg@redhat.com>
Wed, 16 Dec 2009 00:47:21 +0000 (16:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:20:08 +0000 (07:20 -0800)
commitd51965037325e51f6cd68583413243c3573e47b0
treeb12a96e5adc82f3b72a22f054c9a51dc05d4a302
parent7f38551fc3ff0e17a38d6f3f0f8831380a88f3cc
ptrace: x86: change syscall_trace_leave() to rely on tracehook when stepping

Suggested by Roland.

Unlike powepc, x86 always calls tracehook_report_syscall_exit(step) with
step = 0, and sends the trap by hand.

This results in unnecessary SIGTRAP when PTRACE_SINGLESTEP follows the
syscall-exit stop.

Change syscall_trace_leave() to pass the correct "step" argument to
tracehook and remove the send_sigtrap() logic.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/ptrace.c