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

[PATCH utrace-3.0 23/22] ptrace_report_syscall: check if TIF_SYSCALL_EMU is defined



From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>

TIF_SYSCALL_EMU is x86 only, add ifdef into ptrace_report_syscall().

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
---
 include/linux/tracehook.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index ac833de..d5baf86 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -76,8 +76,12 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
 {
 	int ptrace = task_ptrace(current);
 
-	if (!(ptrace & PT_SYSCALL_TRACE) && !test_thread_flag(TIF_SYSCALL_EMU))
-		return;
+	if (!(ptrace & PT_SYSCALL_TRACE)) {
+#ifdef TIF_SYSCALL_EMU
+		if (!test_thread_flag(TIF_SYSCALL_EMU))
+#endif
+			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