4d16a64 "introduce PT_SYSCALL_TRACE flag" breaks PTRACE_SYSEMU
which doesn't set PT_SYSCALL_TRACE.
Change ptrace_report_syscall() to check TIF_SYSCALL_EMU as well.
This can't conflict with utrace, this flag can only be set by
ptrace.
Signed-off-by: Oleg Nesterov <oleg(a)redhat.com>
---
include/linux/tracehook.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index b6812d4..90ca578 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -59,7 +59,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
{
int ptrace = current->ptrace;
- if (!(ptrace & PT_SYSCALL_TRACE))
+ if (!(ptrace & PT_SYSCALL_TRACE) && !test_thread_flag(TIF_SYSCALL_EMU))
return;
ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
--
1.5.5.1