[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 30/33] ptrace_report_syscall: check TIF_SYSCALL_EMU



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@xxxxxxxxxx>
---
 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

_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/kernel



[Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Deep Creek Hot Springs]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

Powered by Linux