Use "unknown" for compat syscalls
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 17 Sep 2011 14:54:16 +0000 (10:54 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 17 Sep 2011 14:54:16 +0000 (10:54 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-syscalls.c

index 378d9f1ef64a68344fe0f2b0586b4bcbebdbbb47..40bf9575ddbb071dc923542803e74a9d1e88437e 100644 (file)
 
 #include <linux/module.h>
 #include <linux/slab.h>
+#include <linux/compat.h>
 #include <asm/ptrace.h>
 #include <asm/syscall.h>
 
 #include "ltt-events.h"
 
+#ifndef CONFIG_COMPAT
+static inline int is_compat_task(void)
+{
+       return 0;
+}
+#endif
+
 static void syscall_entry_probe(void *__data, struct pt_regs *regs, long id);
 
 /*
@@ -80,13 +88,18 @@ static void syscall_entry_unknown(struct ltt_channel *chan,
        __event_probe__sys_unknown(event, id, args);
 }
 
+/*
+ * Currently, given that the kernel syscall metadata extraction only
+ * considers native system calls (not 32-bit compability ones), we
+ * fall-back on the "unknown" system call tracing for 32-bit compat.
+ */
 static void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
 {
        struct trace_syscall_entry *entry;
        struct ltt_channel *chan = __data;
        struct ltt_event *event;
 
-       if (unlikely(id >= ARRAY_SIZE(sc_table))) {
+       if (unlikely(is_compat_task() || id >= ARRAY_SIZE(sc_table))) {
                syscall_entry_unknown(chan, regs, id);
                return;
        }
This page took 0.026221 seconds and 4 git commands to generate.