Change tracehook_report_syscall_exit() to look at step flag and send the trap signal if needed.
This change affects ia64, microblaze, parisc, powerpc, sh. They pass nonzero "step" argument to tracehook but since it was ignored the tracee reports via ptrace_notify(), this is not right and not consistent. Signed-off-by: Oleg Nesterov <o...@redhat.com> --- include/linux/tracehook.h | 7 +++++++ 1 file changed, 7 insertions(+) --- TH/include/linux/tracehook.h~3_TRACEHOOK_HANDLE_STEPPING 2009-11-10 01:03:22.000000000 +0100 +++ TH/include/linux/tracehook.h 2009-11-10 22:00:37.000000000 +0100 @@ -134,6 +134,13 @@ static inline __must_check int tracehook */ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step) { + if (step) { + siginfo_t info; + user_single_step_siginfo(current, regs, &info); + force_sig_info(SIGTRAP, &info, current); + return; + } + ptrace_report_syscall(regs); }