From: Mathieu Desnoyers Date: Sat, 17 Sep 2011 14:54:16 +0000 (-0400) Subject: Use "unknown" for compat syscalls X-Git-Tag: v2.0-pre9~40 X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=commitdiff_plain;h=6333ace32ef99a09be6fd1efa2aa621fe5923061 Use "unknown" for compat syscalls Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 378d9f1e..40bf9575 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -10,11 +10,19 @@ #include #include +#include #include #include #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; }