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

Oleg Nesterov oleg at redhat.com
Tue Aug 9 17:30:33 UTC 2011


From: Tony Breeds <tony at bakeyournoodle.com>

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

Signed-off-by: Oleg Nesterov <oleg at redhat.com>
---
 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




More information about the kernel mailing list